Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I saw the excellent answer (link below) but would like to learn for myself how to look for action call of a specific plugin so i can stop it using the idea of EAMan Restricting a Plugin to Only Load its CSS and JS on Selected Pages?

I have used http://wordpress.org/extend/plugins/datapress/ and its js/css is only needed on one page.

Same for other plugins. How do I go about finding out what function those plugins call so I can enabled it on only pages needed.

share|improve this question
    
If the plugin is still actively developed, report your problem back to the plugin author as well please. –  hakre Feb 13 '11 at 10:52
    
Yes, I did let the author know about it. –  Andy Nguyen Feb 13 '11 at 13:17
add comment

1 Answer 1

is_admin() is useful for the front end.

The load-$pagenow hook and a few others are useful on the backend. wp-admin/admin-header.php, for instance, contains:

do_action('admin_enqueue_scripts', $hook_suffix);
do_action("admin_print_styles-$hook_suffix");
do_action('admin_print_styles');
do_action("admin_print_scripts-$hook_suffix");
do_action('admin_print_scripts');
do_action("admin_head-$hook_suffix");
do_action('admin_head');

Note the $hook_suffix variable, which you can var_dump() then and there to know what its value is when your plugin's page is being loaded.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.