Make WordPress Core


Ignore:
Timestamp:
03/07/2021 12:30:38 PM (4 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/post.php

    r50406 r50505  
    17731773     * the post type slug.
    17741774     *
     1775     * Possible hook names include:
     1776     *
     1777     *  - `post_type_labels_post`
     1778     *  - `post_type_labels_page`
     1779     *  - `post_type_labels_attachment`
     1780     *
    17751781     * @since 3.5.0
    17761782     *
     
    50325038     * refer to the new post status and post type, respectively.
    50335039     *
     5040     * Possible hook names include:
     5041     *
     5042     *  - `draft_post`
     5043     *  - `future_post`
     5044     *  - `pending_post`
     5045     *  - `private_post`
     5046     *  - `publish_post`
     5047     *  - `trash_post`
     5048     *  - `draft_page`
     5049     *  - `future_page`
     5050     *  - `pending_page`
     5051     *  - `private_page`
     5052     *  - `publish_page`
     5053     *  - `trash_page`
     5054     *  - `publish_attachment`
     5055     *  - `trash_attachment`
     5056     *
    50345057     * Please note: When this action is hooked using a particular post status (like
    50355058     * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is
Note: See TracChangeset for help on using the changeset viewer.