• I am developing a plugin…

    I know I can use the conditional function is_admin() to detect wether the user is in the WordPress admin but I would like to be able to check wether someone is on the new post/page or manage post/page pages.

    I can check the manage pages by seeing if a post ID exists but is it possible to check if someone is on the new post/page page? I need to check this in the admin_head as I want to include some large external javascript files only if on these pages to avoid loading overhead on other pages.

    Is it possible to do this with the little documented function “admin_head-(page_hook) or admin_head-(plugin_page)”? http://codex.ww.wp.xz.cn/Plugin_API/Action_Reference

The topic ‘Advanced is_admin() question?’ is closed to new replies.