GN Publisher loads its scripts on all admin dashboard pages
-
GN Publisher loads its scripts unnecessarily on all admin panel pages. This can cause conflicts. Currently, the browser console displays such an error on other pages:
Uncaught TypeError: Cannot read properties of null (reading 'click') at gn-admin.js?ver=1.4.2:30:41
Instead of
add_action('admin_enqueue_scripts', 'gnpub_admin_style');
you can do something like this:$page = add_options_page(...); add_action( "admin_print_styles-$page", 'gnpub_admin_style' ); add_action( "admin_print_scripts-$page", 'gnpub_admin_script' );
https://developer.www.ads-software.com/reference/hooks/admin_print_styles-hook_suffix/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘GN Publisher loads its scripts on all admin dashboard pages’ is closed to new replies.