diff --git a/includes/class-nanga-third-party.php b/includes/class-nanga-third-party.php index 2b7b006..37f9d82 100644 --- a/includes/class-nanga-third-party.php +++ b/includes/class-nanga-third-party.php @@ -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'; + } ); + } + } } diff --git a/includes/class-nanga.php b/includes/class-nanga.php index 60fe114..ad8275a 100644 --- a/includes/class-nanga.php +++ b/includes/class-nanga.php @@ -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' );