Make WordPress Core


Ignore:
Timestamp:
03/07/2021 12:30:38 PM (6 years ago)
Author:
johnbillion
Message:

Docs: Add examples of possible names for various hooks whose name contains a dynamic portion.

This provides greater discoverability of such hooks in search results on the Code Reference site as well as increased clarity when reading the source.

See #50734, #52628

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/nav-menu.php

    r49283 r50505  
    546546                                 * The dynamic portion of the hook name, `$post_type_name`, refers to the post type name.
    547547                                 *
     548                                 * Possible hook names include:
     549                                 *
     550                                 *  - `nav_menu_items_post_recent`
     551                                 *  - `nav_menu_items_page_recent`
     552                                 *
    548553                                 * @since 4.3.0
    549554                                 * @since 4.9.0 Added the `$recent_args` parameter.
    … …  
    633638                                 * The dynamic portion of the hook name, `$post_type_name`, refers
    634639                                 * to the slug of the current post type.
     640                                 *
     641                                 * Possible hook names include:
     642                                 *
     643                                 *  - `nav_menu_items_post`
     644                                 *  - `nav_menu_items_page`
    635645                                 *
    636646                                 * @since 3.2.0
Note: See TracChangeset for help on using the changeset viewer.