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-includes/class-wp-theme.php

    r49946 r50505  
    12701270                 * The dynamic portion of the hook name, `$post_type`, refers to the post type.
    12711271                 *
     1272                 * Possible hook names include:
     1273                 *
     1274                 *  - `theme_post_templates`
     1275                 *  - `theme_page_templates`
     1276                 *  - `theme_attachment_templates`
     1277                 *
    12721278                 * @since 3.9.0
    12731279                 * @since 4.4.0 Converted to allow complete control over the `$page_templates` array.
Note: See TracChangeset for help on using the changeset viewer.