Skip to content

Commit

Permalink
Change enqueue of the script to solid style
Browse files Browse the repository at this point in the history
  • Loading branch information
bueltge committed Nov 14, 2019
1 parent 057ead2 commit b7a0ab9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions inc/autoload/class-filtering-themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ public static function init() {
* Filtering_Plugins constructor.
*/
public function __construct() {
add_action( 'admin_print_scripts-themes.php', array( $this, 'enqueue_script' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_script' ) );
}

/**
* Enqueue scripts.
*/
public function enqueue_script() {
public function enqueue_script( $hook ) {
if ( is_admin() && 'themes.php' !== $hook ) {
return;
}
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';

wp_register_script(
Expand Down

0 comments on commit b7a0ab9

Please sign in to comment.