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

    r49942 r50505  
    238238                 * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
    239239                 *
     240                 * Possible hook names include:
     241                 *
     242                 *  - `rest_category_query`
     243                 *  - `rest_post_tag_query`
     244                 *
    240245                 * Enables adding extra arguments or setting defaults for a terms
    241246                 * collection request.
    … …  
    476481                 * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
    477482                 *
     483                 * Possible hook names include:
     484                 *
     485                 *  - `rest_insert_category`
     486                 *  - `rest_insert_post_tag`
     487                 *
    478488                 * @since 4.7.0
    479489                 *
    … …  
    505515                 *
    506516                 * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
     517                 *
     518                 * Possible hook names include:
     519                 *
     520                 *  - `rest_after_insert_category`
     521                 *  - `rest_after_insert_post_tag`
    507522                 *
    508523                 * @since 5.0.0
    … …  
    703718                 * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
    704719                 *
     720                 * Possible hook names include:
     721                 *
     722                 *  - `rest_delete_category`
     723                 *  - `rest_delete_post_tag`
     724                 *
    705725                 * @since 4.7.0
    706726                 *
    … …  
    762782                 * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
    763783                 *
     784                 * Possible hook names include:
     785                 *
     786                 *  - `rest_pre_insert_category`
     787                 *  - `rest_pre_insert_post_tag`
     788                 *
    764789                 * @since 4.7.0
    765790                 *
    … …  
    833858                 * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
    834859                 *
    835                  * Possible filter names include:
     860                 * Possible hook names include:
    836861                 *
    837862                 *  - `rest_prepare_category`
Note: See TracChangeset for help on using the changeset viewer.