Skip to content

Commit

Permalink
PHP 5.3.0 support
Browse files Browse the repository at this point in the history
PHP downgraded to version 5.3.0 to support more Wordpress installations.
  • Loading branch information
amostajo committed Jul 29, 2015
1 parent d2aa920 commit e5d0b5e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The power of **Composer** and **MVC** in your **Wordpress** plugins.

## Requirements

* PHP >= 5.5.9
* PHP >= 5.3.0

## Installation

Expand Down Expand Up @@ -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' ) );
}

/**
Expand All @@ -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' ) );
}
}
```
Expand All @@ -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()
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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 )
Expand All @@ -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',
```
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": ">=5.5.9",
"php": ">=5.3.0",
"amostajo/wordpress-plugin-core": "1.0.*"
},
"autoload": {
Expand Down
8 changes: 4 additions & 4 deletions config/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* --------------------------
*/

return [
return array(

'namespace' => 'Plugin',

'paths' => [
'paths' => array(

'controllers' => __DIR__ . '/../controllers/',
'views' => __DIR__ . '/../views/',

],
),

];
);
4 changes: 2 additions & 2 deletions plugin/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );
}

/**
Expand All @@ -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' ) );
}
}

0 comments on commit e5d0b5e

Please sign in to comment.