diff --git a/README.md b/README.md index 294a163..a737961 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The power of **Composer** and **MVC** in your **Wordpress** plugins. ## Requirements -* PHP >= 5.5.9 +* PHP >= 5.3.0 ## Installation @@ -146,7 +146,7 @@ class Main extends Plugin // Call public Wordpress HOOKS and FILTERS here // -------------------------------------------- // i.e. - // add_action( 'save_post', [ &$this, 'save_post' ] ); + // add_action( 'save_post', array( &$this, 'save_post' ) ); } /** @@ -157,7 +157,7 @@ class Main extends Plugin // Call public Wordpress HOOKS and FILTERS here // -------------------------------------------- // i.e. - // add_action( 'admin_init', [ &$this, 'admin_init' ] ); + // add_action( 'admin_init', array( &$this, 'admin_init' ) ); } } ``` @@ -171,7 +171,7 @@ class Main extends Plugin { public function init() { - add_filter( 'the_content', [ &$this, 'filter_content' ] ); + add_filter( 'the_content', array( &$this, 'filter_content' ) ); } public function on_admin() @@ -199,7 +199,7 @@ class Main extends Plugin public function on_admin() { - add_action( 'add_meta_boxes', [ &$this, 'metaboxes' ] ); + add_action( 'add_meta_boxes', array( &$this, 'metaboxes' ) ); } public function metaboxes( $post_type, $post ) @@ -242,7 +242,7 @@ class Main extends Plugin public function on_admin() { - add_action( 'save_post', [ &$this, 'save_post' ] ); + add_action( 'save_post', array( &$this, 'save_post' ) ); } public function save_post( $post_id ) @@ -269,9 +269,9 @@ You can add your own config variables into `config\plugin.php` and access them w ```php // In config\plugin.php - 'myapi' => [ + 'myapi' => array( 'key' => 'jdsldjsfl12938nfk', - ], + ), 'url' => 'http://api.com', ``` diff --git a/composer.json b/composer.json index 6b66ea4..bd42ffc 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": ">=5.5.9", + "php": ">=5.3.0", "amostajo/wordpress-plugin-core": "1.0.*" }, "autoload": { diff --git a/config/plugin.php b/config/plugin.php index bba9bc6..de9a888 100644 --- a/config/plugin.php +++ b/config/plugin.php @@ -5,15 +5,15 @@ * -------------------------- */ -return [ +return array( 'namespace' => 'Plugin', - 'paths' => [ + 'paths' => array( 'controllers' => __DIR__ . '/../controllers/', 'views' => __DIR__ . '/../views/', - ], + ), -]; \ No newline at end of file +); \ No newline at end of file diff --git a/plugin/Main.php b/plugin/Main.php index 676384e..7de0d45 100644 --- a/plugin/Main.php +++ b/plugin/Main.php @@ -20,7 +20,7 @@ public function init() // Call public Wordpress HOOKS and FILTERS here // -------------------------------------------- // i.e. - // add_action( 'save_post', [ &$this, 'save_post' ] ); + // add_action( 'save_post', array( &$this, 'save_post' ) ); } /** @@ -31,6 +31,6 @@ public function on_admin() // Call public Wordpress HOOKS and FILTERS here // -------------------------------------------- // i.e. - // add_action( 'admin_init', [ &$this, 'admin_init' ] ); + // add_action( 'admin_init', array( &$this, 'admin_init' ) ); } } \ No newline at end of file