Skip to content

Commit

Permalink
JavaScript conflict with another plugin (MailPoet) - FIXED
Browse files Browse the repository at this point in the history
  • Loading branch information
viruthagiri committed Dec 6, 2016
1 parent 869f502 commit 9ad5b83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/bp-compliments-taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}

/**
Expand Down

0 comments on commit 9ad5b83

Please sign in to comment.