WordPress.org

Make WordPress Core

Changeset 51327


Ignore:
Timestamp:
07/03/2021 09:41:02 PM (3 months ago)
Author:
johnbillion
Message:

Docs: Add and correct examples of common names for various dynamic hooks.

See #53581

Location:
trunk/src
Files:
10 edited

Legend:

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

    r48565 r51327  
    321321     * The dynamic portion of the hook name, `$importer`, refers to the importer slug.
    322322     *
     323     * Possible hook names include:
     324     *
     325     *  - `load-importer-blogger`
     326     *  - `load-importer-wpcat2tag`
     327     *  - `load-importer-livejournal`
     328     *  - `load-importer-mt`
     329     *  - `load-importer-rss`
     330     *  - `load-importer-tumblr`
     331     *  - `load-importer-wordpress`
     332     *
    323333     * @since 3.5.0
    324334     */
  • trunk/src/wp-admin/includes/media.php

    r51302 r51327  
    579579         *
    580580         * The dynamic portion of the hook, `$content_func`, refers to the form
    581          * callback for the media upload type. Possible values include
    582          * 'media_upload_type_form', 'media_upload_type_url_form', and
    583          * 'media_upload_library_form'.
     581         * callback for the media upload type.
    584582         *
    585583         * @since 2.5.0
  • trunk/src/wp-admin/includes/meta-boxes.php

    r50556 r51327  
    15831583     * The dynamic portion of the hook, `$post_type`, refers to the post type of the post.
    15841584     *
     1585     * Possible hook names include:
     1586     *
     1587     *  - `add_meta_boxes_post`
     1588     *  - `add_meta_boxes_page`
     1589     *  - `add_meta_boxes_attachment`
     1590     *
    15851591     * @since 3.0.0
    15861592     *
  • trunk/src/wp-includes/category-template.php

    r50009 r51327  
    13471347     * to the taxonomy slug.
    13481348     *
     1349     * Possible hook names include:
     1350     *
     1351     *  - `term_links-category`
     1352     *  - `term_links-post_tag`
     1353     *  - `term_links-post_format`
     1354     *
    13491355     * @since 2.5.0
    13501356     *
  • trunk/src/wp-includes/class-wp-rewrite.php

    r49670 r51327  
    14121412             *
    14131413             * The dynamic portion of the hook name, `$permastructname`, refers
    1414              * to the name of the registered permastruct, e.g. 'post_tag' (tags),
    1415              * 'category' (categories), etc.
     1414             * to the name of the registered permastruct.
     1415             *
     1416             * Possible hook names include:
     1417             *
     1418             *  - `category_rewrite_rules`
     1419             *  - `post_format_rewrite_rules`
     1420             *  - `post_tag_rewrite_rules`
    14161421             *
    14171422             * @since 3.1.0
  • trunk/src/wp-includes/comment-template.php

    r51300 r51327  
    26482648                     *
    26492649                     * The dynamic portion of the filter hook, `$name`, refers to the name
    2650                      * of the comment form field. Such as 'author', 'email', or 'url'.
     2650                     * of the comment form field.
     2651                     *
     2652                     * Possible hook names include:
     2653                     *
     2654                     *  - `comment_form_field_comment`
     2655                     *  - `comment_form_field_author`
     2656                     *  - `comment_form_field_email`
     2657                     *  - `comment_form_field_url`
     2658                     *  - `comment_form_field_cookies`
    26512659                     *
    26522660                     * @since 3.0.0
  • trunk/src/wp-includes/post.php

    r51301 r51327  
    44124412         * the post type slug.
    44134413         *
     4414         * Possible hook names include:
     4415         *
     4416         *  - `edit_post_post`
     4417         *  - `edit_post_page`
     4418         *
    44144419         * @since 5.1.0
    44154420         *
     
    44484453     * The dynamic portion of the hook name, `$post->post_type`, refers to
    44494454     * the post type slug.
     4455     *
     4456     * Possible hook names include:
     4457     *
     4458     *  - `save_post_post`
     4459     *  - `save_post_page`
    44504460     *
    44514461     * @since 3.7.0
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r51293 r51327  
    10241024         *
    10251025         * They dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
     1026         *
     1027         * Possible hook names include:
     1028         *
     1029         *  - `rest_delete_post`
     1030         *  - `rest_delete_page`
     1031         *  - `rest_delete_attachment`
    10261032         *
    10271033         * @since 4.7.0
     
    25352541         * post type slug for the controller.
    25362542         *
     2543         * Possible hook names include:
     2544         *
     2545         *  - `rest_post_item_schema`
     2546         *  - `rest_page_item_schema`
     2547         *  - `rest_attachment_item_schema`
     2548         *
    25372549         * @since 5.4.0
    25382550         *
  • trunk/src/wp-includes/revision.php

    r51124 r51327  
    575575     * the post type slug.
    576576     *
     577     * Possible hook names include:
     578     *
     579     *  - `wp_post_revisions_to_keep`
     580     *  - `wp_page_revisions_to_keep`
     581     *
    577582     * @since 5.8.0
    578583     *
  • trunk/src/wp-includes/taxonomy.php

    r51003 r51327  
    949949     * to the slug of the term's taxonomy.
    950950     *
     951     * Possible hook names include:
     952     *
     953     *  - `get_category`
     954     *  - `get_post_tag`
     955     *
    951956     * @since 2.3.0
    952957     * @since 4.4.0 `$_term` is now a `WP_Term` object.
Note: See TracChangeset for help on using the changeset viewer.