I am having a problem with my theme’s options panel and a plugin. Apparently they don’t get along very well. Anyway, I need to hook 3 functions on a specific page when I am in the admin panel. More exactly, I need to hook 3 theme options’s functions only on the theme options page. I tried to do it using the code below but I can’t get it to work. I already searched the web for a workaround but I can’t manage to find something good.
function load_required_scripts()
{
if($_GET['page'] === 'theme_options') {
/* required hooks here */
}
}
add_action('admin_init', 'load_required_scripts');
Try passing the
$hook
parameter, and hooking intoadmin_enqueue_scripts
: