|
3 | 3 | Plugin Name: WordPress Plugin Framework |
4 | 4 | Plugin URI: https://github.com/nirjharlo/wp-plugin-framework/ |
5 | 5 | Description: Simple and Light WordPress plugin development framework for organized Object Oriented code for Developers. |
6 | | - Version: 1.2 |
| 6 | + Version: 1.2.1 |
7 | 7 | Author: Nirjhar Lo |
8 | 8 | Author URI: http://nirjharlo.com |
9 | 9 | Text Domain: textdomain |
10 | 10 | Domain Path: /asset/ln |
11 | 11 | License: GPLv2 |
12 | 12 | License URI: http://www.gnu.org/licenses/gpl-3.0.html |
13 | 13 | */ |
14 | | -if (!defined('ABSPATH')) exit; |
| 14 | +if ( !defined( 'ABSPATH' ) ) exit; |
15 | 15 |
|
16 | 16 |
|
17 | 17 | //Define basic names |
18 | 18 | //Edit the "_PLUGIN" in following namespaces for compatibility with your desired name. |
19 | | -defined('PLUGIN_DEBUG') or define('PLUGIN_DEBUG', false); |
| 19 | +defined( 'PLUGIN_DEBUG' ) or define( 'PLUGIN_DEBUG', false ); |
20 | 20 |
|
21 | | -defined('PLUGIN_PATH') or define('PLUGIN_PATH', plugin_dir_path(__FILE__)); |
22 | | -defined('PLUGIN_FILE') or define('PLUGIN_FILE', plugin_basename(__FILE__)); |
| 21 | +defined( 'PLUGIN_PATH' ) or define( 'PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); |
| 22 | +defined( 'PLUGIN_FILE' ) or define( 'PLUGIN_FILE', plugin_basename( __FILE__ ) ); |
23 | 23 |
|
24 | | -defined('PLUGIN_EXECUTE') or define('PLUGIN_EXECUTE', plugin_dir_path(__FILE__).'src/'); |
25 | | -defined('PLUGIN_HELPER') or define('PLUGIN_HELPER', plugin_dir_path(__FILE__).'helper/'); |
26 | | -defined('PLUGIN_TRANSLATE') or define('PLUGIN_TRANSLATE', plugin_basename( plugin_dir_path(__FILE__).'asset/ln/')); |
| 24 | +defined( 'PLUGIN_TRANSLATE' ) or define( 'PLUGIN_TRANSLATE', plugin_basename( plugin_dir_path( __FILE__ ) . 'asset/ln/' ) ); |
27 | 25 |
|
28 | | -//change /wp-plugin-framework/ with your /plugin-name/ |
29 | | -$plugin_file_parts = explode('/', PLUGIN_FILE); |
30 | | -defined('PLUGIN_JS') or define('PLUGIN_JS', plugins_url().'/' . $plugin_file_parts[0] . '/asset/js/'); |
31 | | -defined('PLUGIN_CSS') or define('PLUGIN_CSS', plugins_url().'/' . $plugin_file_parts[0] . '/asset/css/'); |
32 | | -defined('PLUGIN_IMAGE') or define('PLUGIN_IMAGE', plugins_url().'/' . $plugin_file_parts[0] . '/asset/img/'); |
| 26 | +defined( 'PLUGIN_JS' ) or define( 'PLUGIN_JS', plugins_url( '/asset/js/', __FILE__ ) ); |
| 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__ ) ); |
33 | 29 |
|
34 | 30 |
|
35 | 31 | //The Plugin |
|
0 commit comments