From 9ad5b83b686f7960c85b45568cac0055e94f9334 Mon Sep 17 00:00:00 2001 From: Giri Dhar Date: Tue, 6 Dec 2016 12:15:57 +0530 Subject: [PATCH] JavaScript conflict with another plugin (MailPoet) - FIXED --- includes/bp-compliments-taxonomies.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/bp-compliments-taxonomies.php b/includes/bp-compliments-taxonomies.php index 4e07df7..169ed6b 100644 --- a/includes/bp-compliments-taxonomies.php +++ b/includes/bp-compliments-taxonomies.php @@ -73,8 +73,10 @@ function create_compliment_taxonomies() { * @param string $hook_suffix Admin page suffix. */ function compliments_enqueue_admin_js( $hook_suffix ) { - wp_enqueue_media(); - wp_enqueue_script( 'compliments-adminjs', constant( 'BP_COMPLIMENTS_URL' ) . 'js/admin.js', array(), false, true ); + if (($hook_suffix == 'edit-tags.php' || $hook_suffix == 'term.php') && isset($_GET['taxonomy']) && $_GET['taxonomy'] == 'compliment') { + wp_enqueue_media(); + wp_enqueue_script( 'compliments-adminjs', constant( 'BP_COMPLIMENTS_URL' ) . 'js/admin.js', array(), false, true ); + } } /**