WordPress.org

Ready to get started?Download WordPress

Forums

understanding page_hook and hook_suffix (1 post)

  1. Peter_L
    Member
    Posted 4 years ago #

    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:
    admin_print_scripts-{$page-hook)

Topic Closed

This topic has been closed to new replies.

About this Topic