init(); //add_action( 'admin_enqueue_scripts', 'enqueue_pro_scripts' ); add_action('admin_enqueue_scripts', 'enqueue_pro_scripts'); } function enqueue_pro_scripts() { $utils = new utils(); $aeroscroll_gallery_iteration = $utils->get_iteration(); $screen = get_current_screen(); if (strpos($screen->id, 'aeroscroll-gallery') !== false) { //echo "SCREEN ID: --------------------------> : " . $screen->id; wp_register_script('pro-scripts.js', plugin_dir_url(__FILE__) . 'js/pro-scripts.js?v=' . $aeroscroll_gallery_iteration, '1.0.0', array( 'strategy' => 'defer', ), true); wp_enqueue_script('pro-scripts.js'); } }