Make WordPress Core

Changeset 51837


Ignore:
Timestamp:
09/21/2021 06:19:19 PM (5 years ago)
Author:
johnbillion
Message:

Docs: Document some more common names for dynamic hooks and standardise the phrasing used.

Fixes #53581

Location:
trunk/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin-header.php

    r50996 r51837  
    133133 * Fires in head section for a specific admin page.
    134134 *
    135  * The dynamic portion of the hook, `$hook_suffix`, refers to the hook suffix
     135 * The dynamic portion of the hook name, `$hook_suffix`, refers to the hook suffix
    136136 * for the admin page.
    137137 *
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r51678 r51837  
    226226                 *  - `install_plugins_table_api_args_recommended`
    227227                 *  - `install_plugins_table_api_args_upload`
     228                 *  - `install_plugins_table_api_args_search`
     229                 *  - `install_plugins_table_api_args_beta`
    228230                 *
    229231                 * @since 3.7.0
  • trunk/src/wp-admin/includes/media.php

    r51484 r51837  
    578578                 * (pre-3.5.0) media upload popup.
    579579                 *
    580                  * The dynamic portion of the hook, `$content_func`, refers to the form
     580                 * The dynamic portion of the hook name, `$content_func`, refers to the form
    581581                 * callback for the media upload type.
    582582                 *
  • trunk/src/wp-admin/includes/meta-boxes.php

    r51732 r51837  
    15821582         * Fires after all built-in meta boxes have been added, contextually for the given post type.
    15831583         *
    1584          * The dynamic portion of the hook, `$post_type`, refers to the post type of the post.
     1584         * The dynamic portion of the hook name, `$post_type`, refers to the post type of the post.
    15851585         *
    15861586         * Possible hook names include:
  • trunk/src/wp-admin/includes/misc.php

    r50025 r51837  
    717717                                 * Filters a screen option value before it is set.
    718718                                 *
    719                                  * The dynamic portion of the hook, `$option`, refers to the option name.
     719                                 * The dynamic portion of the hook name, `$option`, refers to the option name.
    720720                                 *
    721721                                 * Returning false from the filter will skip saving the current option.
  • trunk/src/wp-admin/plugin-install.php

    r51475 r51837  
    6464 * Fires before each tab on the Install Plugins screen is loaded.
    6565 *
    66  * The dynamic portion of the action hook, `$tab`, allows for targeting
    67  * individual tabs, for instance 'install_plugins_pre_plugin-information'.
     66 * The dynamic portion of the hook name, `$tab`, allows for targeting
     67 * individual tabs.
     68 *
     69 * Possible hook names include:
     70 *
     71 *  - `install_plugins_pre_beta`
     72 *  - `install_plugins_pre_favorites`
     73 *  - `install_plugins_pre_featured`
     74 *  - `install_plugins_pre_plugin-information`
     75 *  - `install_plugins_pre_popular`
     76 *  - `install_plugins_pre_recommended`
     77 *  - `install_plugins_pre_search`
     78 *  - `install_plugins_pre_upload`
    6879 *
    6980 * @since 2.7.0
     
    165176 * Fires after the plugins list table in each tab of the Install Plugins screen.
    166177 *
    167  * The dynamic portion of the action hook, `$tab`, allows for targeting
    168  * individual tabs, for instance 'install_plugins_plugin-information'.
     178 * The dynamic portion of the hook name, `$tab`, allows for targeting
     179 * individual tabs.
     180 *
     181 * Possible hook names include:
     182 *
     183 *  - `install_plugins_beta`
     184 *  - `install_plugins_favorites`
     185 *  - `install_plugins_featured`
     186 *  - `install_plugins_plugin-information`
     187 *  - `install_plugins_popular`
     188 *  - `install_plugins_recommended`
     189 *  - `install_plugins_search`
     190 *  - `install_plugins_upload`
    169191 *
    170192 * @since 2.7.0
  • trunk/src/wp-admin/user-edit.php

    r51475 r51837  
    554554                         * Filters a user contactmethod label.
    555555                         *
    556                          * The dynamic portion of the filter hook, `$name`, refers to
     556                         * The dynamic portion of the hook name, `$name`, refers to
    557557                         * each of the keys in the contact methods array.
    558558                         *
  • trunk/src/wp-includes/category-template.php

    r51327 r51837  
    13441344         * Filters the term links for a given taxonomy.
    13451345         *
    1346          * The dynamic portion of the filter name, `$taxonomy`, refers
     1346         * The dynamic portion of the hook name, `$taxonomy`, refers
    13471347         * to the taxonomy slug.
    13481348         *
  • trunk/src/wp-includes/comment-template.php

    r51327 r51837  
    26472647                                         * Filters a comment form field for display.
    26482648                                         *
    2649                                          * The dynamic portion of the filter hook, `$name`, refers to the name
     2649                                         * The dynamic portion of the hook name, `$name`, refers to the name
    26502650                                         * of the comment form field.
    26512651                                         *
  • trunk/src/wp-includes/comment.php

    r50641 r51837  
    18271827                 * refer to the old and new comment statuses, respectively.
    18281828                 *
     1829                 * Possible hook names include:
     1830                 *
     1831                 *  - `comment_unapproved_to_approved`
     1832                 *  - `comment_spam_to_approved`
     1833                 *  - `comment_approved_to_unapproved`
     1834                 *  - `comment_spam_to_unapproved`
     1835                 *  - `comment_unapproved_to_spam`
     1836                 *  - `comment_approved_to_spam`
     1837                 *
    18291838                 * @since 2.7.0
    18301839                 *
     
    18391848         * refer to the new comment status, and the type of comment, respectively.
    18401849         *
    1841          * Typical comment types include an empty string (standard comment), 'pingback',
    1842          * or 'trackback'.
     1850         * Typical comment types include 'comment', 'pingback', or 'trackback'.
     1851         *
     1852         * Possible hook names include:
     1853         *
     1854         *  - `comment_approved_comment`
     1855         *  - `comment_approved_pingback`
     1856         *  - `comment_approved_trackback`
     1857         *  - `comment_unapproved_comment`
     1858         *  - `comment_unapproved_pingback`
     1859         *  - `comment_unapproved_trackback`
     1860         *  - `comment_spam_comment`
     1861         *  - `comment_spam_pingback`
     1862         *  - `comment_spam_trackback`
    18431863         *
    18441864         * @since 2.7.0
  • trunk/src/wp-includes/l10n.php

    r51599 r51837  
    192192         * Filters text with its translation for a domain.
    193193         *
    194          * The dynamic portion of the hook, `$domain`, refers to the text domain.
     194         * The dynamic portion of the hook name, `$domain`, refers to the text domain.
    195195         *
    196196         * @since 5.5.0
     
    260260         * Filters text with its translation based on context information for a domain.
    261261         *
    262          * The dynamic portion of the hook, `$domain`, refers to the text domain.
     262         * The dynamic portion of the hook name, `$domain`, refers to the text domain.
    263263         *
    264264         * @since 5.5.0
     
    483483         * Filters the singular or plural form of a string for a domain.
    484484         *
    485          * The dynamic portion of the hook, `$domain`, refers to the text domain.
     485         * The dynamic portion of the hook name, `$domain`, refers to the text domain.
    486486         *
    487487         * @since 5.5.0
     
    543543         * Filters the singular or plural form of a string with gettext context for a domain.
    544544         *
    545          * The dynamic portion of the hook, `$domain`, refers to the text domain.
     545         * The dynamic portion of the hook name, `$domain`, refers to the text domain.
    546546         *
    547547         * @since 5.5.0
  • trunk/src/wp-includes/meta.php

    r51326 r51837  
    5757         * Short-circuits adding metadata of a specific type.
    5858         *
    59          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     59         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    6060         * (post, comment, term, user, or any other type with an associated meta table).
    6161         * Returning a non-null value will effectively short-circuit the function.
     
    9797         * Fires immediately before meta of a specific type is added.
    9898         *
    99          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     99         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    100100         * (post, comment, term, user, or any other type with an associated meta table).
    101101         *
     
    135135         * Fires immediately after meta of a specific type is added.
    136136         *
    137          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     137         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    138138         * (post, comment, term, user, or any other type with an associated meta table).
    139139         *
     
    210210         * Short-circuits updating metadata of a specific type.
    211211         *
    212          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     212         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    213213         * (post, comment, term, user, or any other type with an associated meta table).
    214214         * Returning a non-null value will effectively short-circuit the function.
     
    269269                 * Fires immediately before updating metadata of a specific type.
    270270                 *
    271                  * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     271                 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    272272                 * (post, comment, term, user, or any other type with an associated meta table).
    273273                 *
     
    315315                 * Fires immediately after updating metadata of a specific type.
    316316                 *
    317                  * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     317                 * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    318318                 * (post, comment, term, user, or any other type with an associated meta table).
    319319                 *
     
    402402         * Short-circuits deleting metadata of a specific type.
    403403         *
    404          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     404         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    405405         * (post, comment, term, user, or any other type with an associated meta table).
    406406         * Returning a non-null value will effectively short-circuit the function.
     
    457457         * Fires immediately before deleting metadata of a specific type.
    458458         *
    459          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     459         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    460460         * (post, comment, term, user, or any other type with an associated meta table).
    461461         *
     
    507507         * Fires immediately after deleting metadata of a specific type.
    508508         *
    509          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     509         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    510510         * (post, comment, term, user, or any other type with an associated meta table).
    511511         *
     
    609609         * Short-circuits the return value of a meta field.
    610610         *
    611          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     611         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    612612         * (post, comment, term, user, or any other type with an associated meta table).
    613613         * Returning a non-null value will effectively short-circuit the function.
     
    693693         * Filters the default metadata value for a specified meta key and object.
    694694         *
    695          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     695         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    696696         * (post, comment, term, user, or any other type with an associated meta table).
    697697         *
     
    806806         * Short-circuits the return value when fetching a meta field by meta ID.
    807807         *
    808          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     808         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    809809         * (post, comment, term, user, or any other type with an associated meta table).
    810810         * Returning a non-null value will effectively short-circuit the function.
     
    880880         * Short-circuits updating metadata of a specific type by meta ID.
    881881         *
    882          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     882         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    883883         * (post, comment, term, user, or any other type with an associated meta table).
    884884         * Returning a non-null value will effectively short-circuit the function.
     
    10031003         * Short-circuits deleting metadata of a specific type by meta ID.
    10041004         *
    1005          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     1005         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    10061006         * (post, comment, term, user, or any other type with an associated meta table).
    10071007         * Returning a non-null value will effectively short-circuit the function.
     
    10371037                         * Fires immediately before deleting post or comment metadata of a specific type.
    10381038                         *
    1039                          * The dynamic portion of the hook, `$meta_type`, refers to the meta
     1039                         * The dynamic portion of the hook name, `$meta_type`, refers to the meta
    10401040                         * object type (post or comment).
    10411041                         *
     
    10681068                         * Fires immediately after deleting post or comment metadata of a specific type.
    10691069                         *
    1070                          * The dynamic portion of the hook, `$meta_type`, refers to the meta
     1070                         * The dynamic portion of the hook name, `$meta_type`, refers to the meta
    10711071                         * object type (post or comment).
    10721072                         *
     
    11291129         * Short-circuits updating the metadata cache of a specific type.
    11301130         *
    1131          * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
     1131         * The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
    11321132         * (post, comment, term, user, or any other type with an associated meta table).
    11331133         * Returning a non-null value will effectively short-circuit the function.
     
    17751775         * Filters the object subtype identifier for a non-standard object type.
    17761776         *
    1777          * The dynamic portion of the hook, `$object_type`, refers to the meta object type
     1777         * The dynamic portion of the hook name, `$object_type`, refers to the meta object type
    17781778         * (post, comment, term, user, or any other type with an associated meta table).
    17791779         *
  • trunk/src/wp-includes/post.php

    r51430 r51837  
    51135113         * refer to the old and new post statuses, respectively.
    51145114         *
     5115         * Possible hook names include:
     5116         *
     5117         *  - `draft_to_publish`
     5118         *  - `publish_to_trash`
     5119         *  - `pending_to_draft`
     5120         *
    51155121         * @since 2.3.0
    51165122         *
  • trunk/src/wp-includes/taxonomy.php

    r51796 r51837  
    946946         * Filters a taxonomy term object.
    947947         *
    948          * The dynamic portion of the filter name, `$taxonomy`, refers
     948         * The dynamic portion of the hook name, `$taxonomy`, refers
    949949         * to the slug of the term's taxonomy.
    950950         *
     
    16601660                 * Filters a term field to edit before it is sanitized.
    16611661                 *
    1662                  * The dynamic portion of the filter name, `$field`, refers to the term field.
     1662                 * The dynamic portion of the hook name, `$field`, refers to the term field.
    16631663                 *
    16641664                 * @since 2.3.0
     
    16931693                 * Filters a term field value before it is sanitized.
    16941694                 *
    1695                  * The dynamic portion of the filter name, `$field`, refers to the term field.
     1695                 * The dynamic portion of the hook name, `$field`, refers to the term field.
    16961696                 *
    16971697                 * @since 2.3.0
     
    17321732                 * Filters the term field for use in RSS.
    17331733                 *
    1734                  * The dynamic portion of the filter name, `$field`, refers to the term field.
     1734                 * The dynamic portion of the hook name, `$field`, refers to the term field.
    17351735                 *
    17361736                 * @since 2.3.0
     
    17581758                 * Filters the term field sanitized for display.
    17591759                 *
    1760                  * The dynamic portion of the filter name, `$field`, refers to the term field name.
     1760                 * The dynamic portion of the hook name, `$field`, refers to the term field name.
    17611761                 *
    17621762                 * @since 2.3.0
Note: See TracChangeset for help on using the changeset viewer.