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/rest-api/endpoints/class-wp-rest-posts-controller.php

    r50157 r50505  
    291291         * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
    292292         *
    293          * Possible filter names include:
     293         * Possible hook names include:
    294294         *
    295295         *  - `rest_post_query`
     
    611611         * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
    612612         *
     613         * Possible hook names include:
     614         *
     615         *  - `rest_insert_post`
     616         *  - `rest_insert_page`
     617         *  - `rest_insert_attachment`
     618         *
    613619         * @since 4.7.0
    614620         *
     
    669675         * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
    670676         *
     677         * Possible hook names include:
     678         *
     679         *  - `rest_after_insert_post`
     680         *  - `rest_after_insert_page`
     681         *  - `rest_after_insert_attachment`
     682         *
    671683         * @since 5.0.0
    672684         *
     
    890902         *
    891903         * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
     904         *
     905         * Possible hook names include:
     906         *
     907         *  - `rest_post_trashable`
     908         *  - `rest_page_trashable`
     909         *  - `rest_attachment_trashable`
    892910         *
    893911         * Pass false to disable Trash support for the post.
     
    12511269         *
    12521270         * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
     1271         *
     1272         * Possible hook names include:
     1273         *
     1274         *  - `rest_pre_insert_post`
     1275         *  - `rest_pre_insert_page`
     1276         *  - `rest_pre_insert_attachment`
    12531277         *
    12541278         * @since 4.7.0
     
    18551879         * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
    18561880         *
    1857          * Possible filter names include:
     1881         * Possible hook names include:
    18581882         *
    18591883         *  - `rest_prepare_post`
Note: See TracChangeset for help on using the changeset viewer.