Make WordPress Core


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

    r50128 r50505  
    6969         * Contextually filter a post revision field.
    7070         *
    71          * The dynamic portion of the hook name, `$field`, corresponds to each of the post
    72          * fields of the revision object being iterated over in a foreach statement.
     71         * The dynamic portion of the hook name, `$field`, corresponds to a name of a
     72         * field of the revision object.
     73         *
     74         * Possible hook names include:
     75         *
     76         *  - `_wp_post_revision_field_post_title`
     77         *  - `_wp_post_revision_field_post_content`
     78         *  - `_wp_post_revision_field_post_excerpt`
    7379         *
    7480         * @since 3.6.0
Note: See TracChangeset for help on using the changeset viewer.