From ea172d452b1979c1a92d90118ebe4c24c35b31bd Mon Sep 17 00:00:00 2001 From: Leo Germani Date: Thu, 16 Aug 2018 17:25:17 -0300 Subject: [PATCH] fix enqueue_script condition --- src/theme-helper/class-tainacan-theme-helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/theme-helper/class-tainacan-theme-helper.php b/src/theme-helper/class-tainacan-theme-helper.php index ed5b32bfe..c773f3525 100644 --- a/src/theme-helper/class-tainacan-theme-helper.php +++ b/src/theme-helper/class-tainacan-theme-helper.php @@ -81,11 +81,11 @@ class Theme_Helper { public function enqueue_scripts($force = false) { global $TAINACAN_BASE_URL; - // if ( $force || is_post_type_archive( \Tainacan\Repositories\Repository::get_collections_db_identifiers() ) ) { + if ( $force || is_post_type_archive( \Tainacan\Repositories\Repository::get_collections_db_identifiers() ) || tainacan_get_term() ) { //\Tainacan\Admin::get_instance()->add_admin_js(); wp_enqueue_script('tainacan-search', $TAINACAN_BASE_URL . '/assets/user_search-components.js' , [] , null, true); wp_localize_script('tainacan-search', 'tainacan_plugin', \Tainacan\Admin::get_instance()->get_admin_js_localization_params()); - // } + } } public function is_post_an_item(\WP_Post $post) {