Skip to content

Commit

Permalink
Change Timber cache location
Browse files Browse the repository at this point in the history
  • Loading branch information
Mallinanga committed Nov 28, 2015
1 parent e64ec63 commit c254033
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/class-nanga-third-party.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,12 @@ public function features_json_api() {
} );
}
}

public function features_timber() {
if ( class_exists( 'Timber' ) ) {
add_filter( 'timber/cache/location', function () {
return WP_CONTENT_DIR . '/cache/timber';
} );
}
}
}
1 change: 1 addition & 0 deletions includes/class-nanga.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ private function define_third_party() {
$this->loader->add_action( 'plugins_loaded', $plugin_third_party, 'features_gravity_forms' );
$this->loader->add_action( 'plugins_loaded', $plugin_third_party, 'features_jetpack' );
$this->loader->add_action( 'plugins_loaded', $plugin_third_party, 'features_json_api' );
$this->loader->add_action( 'plugins_loaded', $plugin_third_party, 'features_timber' );
$this->loader->add_action( 'plugins_loaded', $plugin_third_party, 'features_woocommerce' );
$this->loader->add_action( 'plugins_loaded', $plugin_third_party, 'features_wordpress_social_login' );
$this->loader->add_action( 'plugins_loaded', $plugin_third_party, 'features_wpml' );
Expand Down

0 comments on commit c254033

Please sign in to comment.