Support » Plugins and Hacks » understanding page_hook and hook_suffix

understanding page_hook and hook_suffix

  • Hello,

    I am struggling to add some custom jQuery scripts to a custom post type.

    More specifically, inside my admin panel, I only want these jQuery files for my custom post types. Not for the entire admin panel.

    I think one of these might do it:

    add_action('admin_print_scripts-{$hook_suffix}', 'enqueue_function');
    add_action('admin_print_scripts-{$page-hook)', 'enqueue_function');
    add_action('admin_print_scripts-{$mypage}, 'enqueue_function';
    add_action('admin_head-'. $plugin_page, 'enqueue_function';
    or some other variant

    The problem is, I don’t really get the concept of page hook and I certainly don’t know what the page hook for a custom post type is.

    So, the question is: what do I fill in here:

  • The topic ‘understanding page_hook and hook_suffix’ is closed to new replies.