admin_print_scripts not loading javascript, but loading stylesheet?
-
Hi Everyone,
I’m working on a plugin where I need a special javascript and css file loaded on my plugin’s options page. I’ve enqueued these scripts using the
admin_print_scripts
hook, but only the stylesheet is being loaded, but the javascript is being completely ignored?I’m using a PHP Class for my Plugin to prevent name collisions and keep everything nice and neat. And I am also using an instance of the class instead of static methods to keep from having to register a bunch of global variables.
in my main plugin file, I load the Class
IBLikeable
, and instantiate it, and attach an action toadmin_init
andadmin_menus
as seen here:$ibl = new IBLikeable(); add_action('admin_init', array( $ibl, 'register_settings')); add_action('admin_menu', array( $ibl, 'register_admin_menus'));
Inside my IBLikeable Class, the
IBLikeable::register_admin_menus()
function looks like this: https://pastebin.com/egVmpL9LI can’t for the life of me figure out why the
wp_enqueue_script
call in theIBLikeable::enqueue_admin
function isn’t working when the style enqueue above is working just fine.Can anybody help me debug?
- The topic ‘admin_print_scripts not loading javascript, but loading stylesheet?’ is closed to new replies.