Skip to content

Commit 1297c1e

Browse files
committed
Plugin file formatting
1 parent c2191f1 commit 1297c1e

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

wp-plugin-framework.php

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,29 @@
33
Plugin Name: WordPress Plugin Framework
44
Plugin URI: https://github.com/nirjharlo/wp-plugin-framework/
55
Description: Simple and Light WordPress plugin development framework for organized Object Oriented code for Developers.
6-
Version: 1.2
6+
Version: 1.2.1
77
Author: Nirjhar Lo
88
Author URI: http://nirjharlo.com
99
Text Domain: textdomain
1010
Domain Path: /asset/ln
1111
License: GPLv2
1212
License URI: http://www.gnu.org/licenses/gpl-3.0.html
1313
*/
14-
if (!defined('ABSPATH')) exit;
14+
if ( !defined( 'ABSPATH' ) ) exit;
1515

1616

1717
//Define basic names
1818
//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 );
2020

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__ ) );
2323

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/' ) );
2725

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__ ) );
3329

3430

3531
//The Plugin

0 commit comments

Comments
 (0)