Make WordPress Core

Changeset 51326


Ignore:
Timestamp:
07/03/2021 09:31:13 PM (5 years ago)
Author:
johnbillion
Message:

Docs: Document common names for dynamic hooks relating to metadata.

See #53581

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/meta.php

    r50641 r51326  
    6161         * Returning a non-null value will effectively short-circuit the function.
    6262         *
     63         * Possible hook names include:
     64         *
     65         *  - `add_post_metadata`
     66         *  - `add_comment_metadata`
     67         *  - `add_term_metadata`
     68         *  - `add_user_metadata`
     69         *
    6370         * @since 3.1.0
    6471         *
    … …  
    93100         * (post, comment, term, user, or any other type with an associated meta table).
    94101         *
     102         * Possible hook names include:
     103         *
     104         *  - `add_post_meta`
     105         *  - `add_comment_meta`
     106         *  - `add_term_meta`
     107         *  - `add_user_meta`
     108         *
    95109         * @since 3.1.0
    96110         *
    … …  
    123137         * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
    124138         * (post, comment, term, user, or any other type with an associated meta table).
     139         *
     140         * Possible hook names include:
     141         *
     142         *  - `added_post_meta`
     143         *  - `added_comment_meta`
     144         *  - `added_term_meta`
     145         *  - `added_user_meta`
    125146         *
    126147         * @since 2.9.0
    … …  
    193214         * Returning a non-null value will effectively short-circuit the function.
    194215         *
     216         * Possible hook names include:
     217         *
     218         *  - `update_post_metadata`
     219         *  - `update_comment_metadata`
     220         *  - `update_term_metadata`
     221         *  - `update_user_metadata`
     222         *
    195223         * @since 3.1.0
    196224         *
    … …  
    243271                 * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
    244272                 * (post, comment, term, user, or any other type with an associated meta table).
     273                 *
     274                 * Possible hook names include:
     275                 *
     276                 *  - `update_post_meta`
     277                 *  - `update_comment_meta`
     278                 *  - `update_term_meta`
     279                 *  - `update_user_meta`
    245280                 *
    246281                 * @since 2.9.0
    … …  
    282317                 * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
    283318                 * (post, comment, term, user, or any other type with an associated meta table).
     319                 *
     320                 * Possible hook names include:
     321                 *
     322                 *  - `updated_post_meta`
     323                 *  - `updated_comment_meta`
     324                 *  - `updated_term_meta`
     325                 *  - `updated_user_meta`
    284326                 *
    285327                 * @since 2.9.0
    … …  
    364406         * Returning a non-null value will effectively short-circuit the function.
    365407         *
     408         * Possible hook names include:
     409         *
     410         *  - `delete_post_metadata`
     411         *  - `delete_comment_metadata`
     412         *  - `delete_term_metadata`
     413         *  - `delete_user_metadata`
     414         *
    366415         * @since 3.1.0
    367416         *
    … …  
    411460         * (post, comment, term, user, or any other type with an associated meta table).
    412461         *
     462         * Possible hook names include:
     463         *
     464         *  - `delete_post_meta`
     465         *  - `delete_comment_meta`
     466         *  - `delete_term_meta`
     467         *  - `delete_user_meta`
     468         *
    413469         * @since 3.1.0
    414470         *
    … …  
    453509         * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
    454510         * (post, comment, term, user, or any other type with an associated meta table).
     511         *
     512         * Possible hook names include:
     513         *
     514         *  - `deleted_post_meta`
     515         *  - `deleted_comment_meta`
     516         *  - `deleted_term_meta`
     517         *  - `deleted_user_meta`
    455518         *
    456519         * @since 2.9.0
    … …  
    747810         * Returning a non-null value will effectively short-circuit the function.
    748811         *
     812         * Possible hook names include:
     813         *
     814         *  - `get_post_metadata_by_mid`
     815         *  - `get_comment_metadata_by_mid`
     816         *  - `get_term_metadata_by_mid`
     817         *  - `get_user_metadata_by_mid`
     818         *
    749819         * @since 5.0.0
    750820         *
    … …  
    813883         * (post, comment, term, user, or any other type with an associated meta table).
    814884         * Returning a non-null value will effectively short-circuit the function.
     885         *
     886         * Possible hook names include:
     887         *
     888         *  - `update_post_metadata_by_mid`
     889         *  - `update_comment_metadata_by_mid`
     890         *  - `update_term_metadata_by_mid`
     891         *  - `update_user_metadata_by_mid`
    815892         *
    816893         * @since 5.0.0
    … …  
    9301007         * Returning a non-null value will effectively short-circuit the function.
    9311008         *
     1009         * Possible hook names include:
     1010         *
     1011         *  - `delete_post_metadata_by_mid`
     1012         *  - `delete_comment_metadata_by_mid`
     1013         *  - `delete_term_metadata_by_mid`
     1014         *  - `delete_user_metadata_by_mid`
     1015         *
    9321016         * @since 5.0.0
    9331017         *
    … …  
    9561040                         * object type (post or comment).
    9571041                         *
     1042                         * Possible hook names include:
     1043                         *
     1044                         *  - `delete_postmeta`
     1045                         *  - `delete_commentmeta`
     1046                         *  - `delete_termmeta`
     1047                         *  - `delete_usermeta`
     1048                         *
    9581049                         * @since 3.4.0
    9591050                         *
    … …  
    9801071                         * object type (post or comment).
    9811072                         *
     1073                         * Possible hook names include:
     1074                         *
     1075                         *  - `deleted_postmeta`
     1076                         *  - `deleted_commentmeta`
     1077                         *  - `deleted_termmeta`
     1078                         *  - `deleted_usermeta`
     1079                         *
    9821080                         * @since 3.4.0
    9831081                         *
    … …  
    10341132         * (post, comment, term, user, or any other type with an associated meta table).
    10351133         * Returning a non-null value will effectively short-circuit the function.
     1134         *
     1135         * Possible hook names include:
     1136         *
     1137         *  - `update_post_metadata_cache`
     1138         *  - `update_comment_metadata_cache`
     1139         *  - `update_term_metadata_cache`
     1140         *  - `update_user_metadata_cache`
    10361141         *
    10371142         * @since 5.0.0
    … …  
    16731778         * (post, comment, term, user, or any other type with an associated meta table).
    16741779         *
     1780         * Possible hook names include:
     1781         *
     1782         *  - `get_object_subtype_post`
     1783         *  - `get_object_subtype_comment`
     1784         *  - `get_object_subtype_term`
     1785         *  - `get_object_subtype_user`
     1786         *
    16751787         * @since 4.9.8
    16761788         *
Note: See TracChangeset for help on using the changeset viewer.