1 | <?php |
||||
2 | /** |
||||
3 | Plugin Name: WordPress Plugin Framework |
||||
4 | Plugin URI: https://github.com/nirjharlo/wp-plugin-framework/ |
||||
5 | Description: Simple and Light WordPress plugin development framework for organized Object Oriented code for Developers. |
||||
6 | Version: 1.4.3 |
||||
7 | Author: Nirjhar Lo |
||||
8 | Author URI: http://nirjharlo.com |
||||
9 | Text Domain: textdomain |
||||
10 | Domain Path: /asset/ln |
||||
11 | License: GPLv2 |
||||
12 | License URI: http://www.gnu.org/licenses/gpl-3.0.html |
||||
13 | */ |
||||
14 | if ( !defined( 'ABSPATH' ) ) exit; |
||||
15 | |||||
16 | |||||
17 | //Define basic names |
||||
18 | //Edit the "_PLUGIN" in following namespaces for compatibility with your desired name. |
||||
19 | defined( 'PLUGIN_DEBUG' ) or define( 'PLUGIN_DEBUG', false ); |
||||
20 | |||||
21 | defined( 'PLUGIN_PATH' ) or define( 'PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
22 | defined( 'PLUGIN_FILE' ) or define( 'PLUGIN_FILE', plugin_basename( __FILE__ ) ); |
||||
0 ignored issues
–
show
The function
plugin_basename was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
23 | |||||
24 | defined( 'PLUGIN_TRANSLATE' ) or define( 'PLUGIN_TRANSLATE', plugin_basename( plugin_dir_path( __FILE__ ) . 'asset/ln/' ) ); |
||||
25 | |||||
26 | defined( 'PLUGIN_JS' ) or define( 'PLUGIN_JS', plugins_url( '/asset/js/', __FILE__ ) ); |
||||
0 ignored issues
–
show
The function
plugins_url was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
27 | defined( 'PLUGIN_CSS' ) or define( 'PLUGIN_CSS', plugins_url( '/asset/css/', __FILE__ ) ); |
||||
28 | defined( 'PLUGIN_IMAGE' ) or define( 'PLUGIN_IMAGE', plugins_url( '/asset/img/', __FILE__ ) ); |
||||
29 | |||||
30 | |||||
31 | //The Plugin |
||||
32 | require_once( 'vendor/autoload.php' ); |
||||
33 | function plugin() { |
||||
34 | if ( class_exists( 'NirjharLo\\WP_Plugin_Framework\\PluginLoader' ) ) { |
||||
35 | return NirjharLo\WP_Plugin_Framework\PluginLoader::instance(); |
||||
36 | } |
||||
37 | } |
||||
38 | |||||
39 | global $plugin; |
||||
40 | $plugin = plugin(); ?> |
||||
0 ignored issues
–
show
It is not recommended to use PHP's closing tag
?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore. A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever. ![]() |
|||||
41 |