Skip to content

Commit

Permalink
Moved CacheObject() init to wordpress-toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmhendricks committed Jan 23, 2018
1 parent 070c9d0 commit 3d17c0e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Release changes are noted on the [Releases](https://github.com/dmhendricks/wordp
#### Branch: `master`

* Extended base class as WordPress Toolkit; simplified base class configuration init
* Moved `is_ajax()` and `prefix()` methods to wordpress-toolkit
* Moved `is_ajax()`/`prefix()` methods, `CacheObject()` init to wordpress-toolkit
* Updated Composer license to conform to new [SPDX](https://spdx.org/licenses/) identifiers
* Added [phpdotenv](https://github.com/etelford/phpdotenv) support ([reference](https://github.com/dmhendricks/wordpress-toolkit/wiki/ToolKit#environment))

Expand Down
2 changes: 1 addition & 1 deletion app/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function __construct() {

// Example - Remove Emoji code from header
if( $this->get_carbon_plugin_option( 'remove_header_emojicons' ) ) {
if(!$this->is_ajax()) add_filter( 'init', array( $this, 'disable_wp_emojicons' ) );
if( !$this->is_ajax() ) add_filter( 'init', array( $this, 'disable_wp_emojicons' ) );
}

/**
Expand Down
4 changes: 0 additions & 4 deletions app/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
class Plugin extends \WordPress_ToolKit\ToolKit {

public static $textdomain;
protected static $cache;

function __construct() {

Expand All @@ -23,9 +22,6 @@ function __construct() {
// Define plugin version
if ( !defined( __NAMESPACE__ . '\VERSION' ) ) define( __NAMESPACE__ . '\VERSION', self::$config->get( 'plugin/meta/Version' ) );

// Initialize ObjectCache
self::$cache = new ObjectCache( self::$config );

// Load dependecies and load plugin logic
register_activation_hook( self::$config->get( 'plugin/identifier' ), array( $this, 'activate' ) );
add_action( 'plugins_loaded', array( $this, 'load_dependencies' ) );
Expand Down

0 comments on commit 3d17c0e

Please sign in to comment.