Make WordPress Core

Changeset 50505


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

Location:
trunk/src
Files:
26 edited

Legend:

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

    r49108 r50505  
    120120     * Filters the returned ID of an uploaded attachment.
    121121     *
    122      * The dynamic portion of the hook name, `$type`, refers to the attachment type,
    123      * such as 'image', 'audio', 'video', 'file', etc.
     122     * The dynamic portion of the hook name, `$type`, refers to the attachment type.
     123     *
     124     * Possible hook names include:
     125     *
     126     *  - `async_upload_audio`
     127     *  - `async_upload_file`
     128     *  - `async_upload_image`
     129     *  - `async_upload_video`
    124130     *
    125131     * @since 2.5.0
  • trunk/src/wp-admin/edit-tag-form.php

    r49183 r50505  
    6060 * The dynamic portion of the hook name, `$taxonomy`, refers to
    6161 * the taxonomy slug.
     62 *
     63 * Possible hook names include:
     64 *
     65 *  - `category_pre_edit_form`
     66 *  - `post_tag_pre_edit_form`
    6267 *
    6368 * @since 3.0.0
     
    97102 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    98103 *
     104 * Possible hook names include:
     105 *
     106 *  - `category_term_edit_form_tag`
     107 *  - `post_tag_term_edit_form_tag`
     108 *
    99109 * @since 3.7.0
    100110 */
     
    115125 *
    116126 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
     127 *
     128 * Possible hook names include:
     129 *
     130 *  - `category_term_edit_form_top`
     131 *  - `post_tag_term_edit_form_top`
    117132 *
    118133 * @since 4.5.0
     
    230245         * the taxonomy slug.
    231246         *
     247         * Possible hook names include:
     248         *
     249         *  - `category_edit_form_fields`
     250         *  - `post_tag_edit_form_fields`
     251         *
    232252         * @since 3.0.0
    233253         *
     
    262282 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    263283 *
     284 * Possible hook names include:
     285 *
     286 *  - `category_edit_form`
     287 *  - `post_tag_edit_form`
     288 *
    264289 * @since 3.0.0
    265290 *
  • trunk/src/wp-admin/edit-tags.php

    r49286 r50505  
    415415     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    416416     *
     417     * Possible hook names include:
     418     *
     419     *  - `category_pre_add_form`
     420     *  - `post_tag_pre_add_form`
     421     *
    417422     * @since 3.0.0
    418423     *
     
    430435     *
    431436     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
     437     *
     438     * Possible hook names include:
     439     *
     440     *  - `category_term_new_form_tag`
     441     *  - `post_tag_term_new_form_tag`
    432442     *
    433443     * @since 3.7.0
     
    523533     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    524534     *
     535     * Possible hook names include:
     536     *
     537     *  - `category_add_form_fields`
     538     *  - `post_tag_add_form_fields`
     539     *
    525540     * @since 3.0.0
    526541     *
     
    570585     *
    571586     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
     587     *
     588     * Possible hook names include:
     589     *
     590     *  - `category_add_form`
     591     *  - `post_tag_add_form`
    572592     *
    573593     * @since 3.0.0
     
    639659 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    640660 *
     661 * Possible hook names include:
     662 *
     663 *  - `after-category-table`
     664 *  - `after-post_tag-table`
     665 *
    641666 * @since 3.0.0
    642667 *
  • trunk/src/wp-admin/includes/class-wp-automatic-updater.php

    r49249 r50505  
    183183         *
    184184         * The dynamic portion of the hook name, `$type`, refers to the type of update
    185          * being checked. Potential hook names include:
     185         * being checked.
     186         *
     187         * Possible hook names include:
    186188         *
    187189         *  - `auto_update_core`
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r48970 r50505  
    214214         *
    215215         * The dynamic portion of the hook name, `$tab`, refers to the plugin install tabs.
    216          * Default tabs include 'featured', 'popular', 'recommended', 'favorites', and 'upload'.
     216         *
     217         * Possible hook names include:
     218         *
     219         *  - `install_plugins_table_api_args_favorites`
     220         *  - `install_plugins_table_api_args_featured`
     221         *  - `install_plugins_table_api_args_popular`
     222         *  - `install_plugins_table_api_args_recommended`
     223         *  - `install_plugins_table_api_args_upload`
    217224         *
    218225         * @since 3.7.0
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r50120 r50505  
    633633         * type slug.
    634634         *
     635         * Possible hook names include:
     636         *
     637         *  - `manage_taxonomies_for_post_columns`
     638         *  - `manage_taxonomies_for_page_columns`
     639         *
    635640         * @since 3.5.0
    636641         *
     
    687692         *
    688693         * The dynamic portion of the hook name, `$post_type`, refers to the post type slug.
     694         *
     695         * Possible hook names include:
     696         *
     697         *  - `manage_post_posts_columns`
     698         *  - `manage_page_posts_columns`
    689699         *
    690700         * @since 3.0.0
     
    12751285         * The dynamic portion of the hook name, `$post->post_type`, refers to the post type.
    12761286         *
     1287         * Possible hook names include:
     1288         *
     1289         *  - `manage_post_posts_custom_column`
     1290         *  - `manage_page_posts_custom_column`
     1291         *
    12771292         * @since 3.1.0
    12781293         *
  • trunk/src/wp-admin/includes/class-wp-terms-list-table.php

    r49944 r50505  
    527527         * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    528528         *
     529         * Possible hook names include:
     530         *
     531         *  - `category_row_actions`
     532         *  - `post_tag_row_actions`
     533         *
    529534         * @since 3.0.0
    530535         *
     
    616621         * The dynamic portion of the hook name, `$this->screen->taxonomy`,
    617622         * refers to the slug of the current taxonomy.
     623         *
     624         * Possible hook names include:
     625         *
     626         *  - `manage_category_custom_column`
     627         *  - `manage_post_tag_custom_column`
    618628         *
    619629         * @since 2.8.0
  • trunk/src/wp-admin/includes/class-wp-theme-install-list-table.php

    r49954 r50505  
    133133         *
    134134         * The dynamic portion of the hook name, `$tab`, refers to the theme install
    135          * tabs. Default tabs are 'dashboard', 'search', 'upload', 'featured',
    136          * 'new', and 'updated'.
     135         * tab.
     136         *
     137         * Possible hook names include:
     138         *
     139         *  - `install_themes_table_api_args_dashboard`
     140         *  - `install_themes_table_api_args_featured`
     141         *  - `install_themes_table_api_args_new`
     142         *  - `install_themes_table_api_args_search`
     143         *  - `install_themes_table_api_args_updated`
     144         *  - `install_themes_table_api_args_upload`
    137145         *
    138146         * @since 3.7.0
  • trunk/src/wp-admin/includes/file.php

    r50149 r50505  
    758758     *
    759759     * The dynamic portion of the hook name, `$action`, refers to the post action.
    760      * Possible filter names include:
     760     *
     761     * Possible hook names include:
    761762     *
    762763     *  - `wp_handle_sideload_prefilter`
     
    774775     *
    775776     * The dynamic portion of the hook name, `$action`, refers to the post action.
    776      * Possible filter names include:
     777     *
     778     * Possible hook names include:
    777779     *
    778780     *  - `wp_handle_sideload_overrides`
  • trunk/src/wp-admin/includes/media.php

    r50264 r50505  
    697697     * of media uploaded.
    698698     *
     699     * Possible hook names include:
     700     *
     701     *  - `image_upload_iframe_src`
     702     *  - `media_upload_iframe_src`
     703     *
    699704     * @since 3.0.0
    700705     *
    701      * @param string $upload_iframe_src The upload iframe source URL by type.
     706     * @param string $upload_iframe_src The upload iframe source URL.
    702707     */
    703708    $upload_iframe_src = apply_filters( "{$type}_upload_iframe_src", $upload_iframe_src );
     
    893898             * The dynamic portion of the hook name, `$type`, refers to the type
    894899             * of media being sent.
     900             *
     901             * Possible hook names include:
     902             *
     903             *  - `audio_send_to_editor_url`
     904             *  - `file_send_to_editor_url`
     905             *  - `video_send_to_editor_url`
    895906             *
    896907             * @since 3.3.0
  • trunk/src/wp-admin/includes/nav-menu.php

    r49283 r50505  
    546546                 * The dynamic portion of the hook name, `$post_type_name`, refers to the post type name.
    547547                 *
     548                 * Possible hook names include:
     549                 *
     550                 *  - `nav_menu_items_post_recent`
     551                 *  - `nav_menu_items_page_recent`
     552                 *
    548553                 * @since 4.3.0
    549554                 * @since 4.9.0 Added the `$recent_args` parameter.
     
    633638                 * The dynamic portion of the hook name, `$post_type_name`, refers
    634639                 * to the slug of the current post type.
     640                 *
     641                 * Possible hook names include:
     642                 *
     643                 *  - `nav_menu_items_post`
     644                 *  - `nav_menu_items_page`
    635645                 *
    636646                 * @since 3.2.0
  • trunk/src/wp-admin/includes/post.php

    r50297 r50505  
    11691169     * The dynamic portion of the hook name, `$post_type`, refers to the post type.
    11701170     *
    1171      * Some examples of filter hooks generated here include: 'edit_attachment_per_page',
    1172      * 'edit_post_per_page', 'edit_page_per_page', etc.
     1171     * Possible hook names include:
     1172     *
     1173     *  - `edit_post_per_page`
     1174     *  - `edit_page_per_page`
     1175     *  - `edit_attachment_per_page`
    11731176     *
    11741177     * @since 3.0.0
  • trunk/src/wp-admin/includes/revision.php

    r50128 r50505  
    6969         * Contextually filter a post revision field.
    7070         *
    71          * The dynamic portion of the hook name, `$field`, corresponds to each of the post
    72          * fields of the revision object being iterated over in a foreach statement.
     71         * The dynamic portion of the hook name, `$field`, corresponds to a name of a
     72         * field of the revision object.
     73         *
     74         * Possible hook names include:
     75         *
     76         *  - `_wp_post_revision_field_post_title`
     77         *  - `_wp_post_revision_field_post_content`
     78         *  - `_wp_post_revision_field_post_excerpt`
    7379         *
    7480         * @since 3.6.0
  • trunk/src/wp-admin/media-upload.php

    r49108 r50505  
    8888     *
    8989     * The dynamic portion of the hook name, `$type`, refers to the specific
    90      * media upload type. Possible values include 'image', 'audio', 'video',
    91      * 'file', etc.
     90     * media upload type.
    9291     *
    9392     * The hook only fires if the current `$tab` is 'type' (From Computer),
    9493     * 'type_url' (From URL), or, if the tab does not exist (i.e., has not
    9594     * been registered via the {@see 'media_upload_tabs'} filter.
     95     *
     96     * Possible hook names include:
     97     *
     98     *  - `media_upload_audio`
     99     *  - `media_upload_file`
     100     *  - `media_upload_image`
     101     *  - `media_upload_video`
    96102     *
    97103     * @since 2.5.0
  • trunk/src/wp-admin/theme-install.php

    r48638 r50505  
    8585     *
    8686     * The dynamic portion of the hook name, `$tab`, refers to the current
    87      * theme installation tab. Possible values are 'dashboard', 'search', 'upload',
    88      * 'featured', 'new', or 'updated'.
     87     * theme installation tab.
     88     *
     89     * Possible hook names include:
     90     *
     91     *  - `install_themes_pre_dashboard`
     92     *  - `install_themes_pre_featured`
     93     *  - `install_themes_pre_new`
     94     *  - `install_themes_pre_search`
     95     *  - `install_themes_pre_updated`
     96     *  - `install_themes_pre_upload`
    8997     *
    9098     * @since 2.8.0
     
    252260     *
    253261     * The dynamic portion of the hook name, `$tab`, refers to the current
    254      * theme installation tab. Possible values are 'dashboard', 'search', 'upload',
    255      * 'featured', 'new', or 'updated'.
     262     * theme installation tab.
     263     *
     264     * Possible hook names include:
     265     *
     266     *  - `install_themes_dashboard`
     267     *  - `install_themes_featured`
     268     *  - `install_themes_new`
     269     *  - `install_themes_search`
     270     *  - `install_themes_updated`
     271     *  - `install_themes_upload`
    256272     *
    257273     * @since 2.8.0
  • trunk/src/wp-includes/class-wp-theme.php

    r49946 r50505  
    12701270         * The dynamic portion of the hook name, `$post_type`, refers to the post type.
    12711271         *
     1272         * Possible hook names include:
     1273         *
     1274         *  - `theme_post_templates`
     1275         *  - `theme_page_templates`
     1276         *  - `theme_attachment_templates`
     1277         *
    12721278         * @since 3.9.0
    12731279         * @since 4.4.0 Converted to allow complete control over the `$page_templates` array.
  • trunk/src/wp-includes/functions.php

    r50409 r50505  
    15691569     *
    15701570     * The dynamic portion of the hook name, `$feed`, refers to the feed template name.
    1571      * Possible values include: 'rdf', 'rss', 'rss2', and 'atom'.
     1571     *
     1572     * Possible hook names include:
     1573     *
     1574     *  - `do_feed_atom`
     1575     *  - `do_feed_rdf`
     1576     *  - `do_feed_rss`
     1577     *  - `do_feed_rss2`
    15721578     *
    15731579     * @since 2.1.0
  • trunk/src/wp-includes/general-template.php

    r50025 r50505  
    47204720     * The dynamic portion of the hook name, `$type`, refers to the generator type.
    47214721     *
     4722     * Possible hook names include:
     4723     *
     4724     *  - `get_the_generator_atom`
     4725     *  - `get_the_generator_comment`
     4726     *  - `get_the_generator_export`
     4727     *  - `get_the_generator_html`
     4728     *  - `get_the_generator_rdf`
     4729     *  - `get_the_generator_rss2`
     4730     *  - `get_the_generator_xhtml`
     4731     *
    47224732     * @since 2.5.0
    47234733     *
  • trunk/src/wp-includes/link-template.php

    r50393 r50505  
    18121812     * of adjacency, 'next' or 'previous'.
    18131813     *
     1814     * Possible hook names include:
     1815     *
     1816     *  - `get_next_post_excluded_terms`
     1817     *  - `get_previous_post_excluded_terms`
     1818     *
    18141819     * @since 4.4.0
    18151820     *
     
    18831888     * of adjacency, 'next' or 'previous'.
    18841889     *
     1890     * Possible hook names include:
     1891     *
     1892     *  - `get_next_post_join`
     1893     *  - `get_previous_post_join`
     1894     *
    18851895     * @since 2.5.0
    18861896     * @since 4.4.0 Added the `$taxonomy` and `$post` parameters.
     
    19001910     * of adjacency, 'next' or 'previous'.
    19011911     *
     1912     * Possible hook names include:
     1913     *
     1914     *  - `get_next_post_where`
     1915     *  - `get_previous_post_where`
     1916     *
    19021917     * @since 2.5.0
    19031918     * @since 4.4.0 Added the `$taxonomy` and `$post` parameters.
     
    19161931     * The dynamic portion of the hook name, `$adjacent`, refers to the type
    19171932     * of adjacency, 'next' or 'previous'.
     1933     *
     1934     * Possible hook names include:
     1935     *
     1936     *  - `get_next_post_sort`
     1937     *  - `get_previous_post_sort`
    19181938     *
    19191939     * @since 2.5.0
     
    20042024     * The dynamic portion of the hook name, `$adjacent`, refers to the type
    20052025     * of adjacency, 'next' or 'previous'.
     2026     *
     2027     * Possible hook names include:
     2028     *
     2029     *  - `next_post_rel_link`
     2030     *  - `previous_post_rel_link`
    20062031     *
    20072032     * @since 2.8.0
     
    22612286     * The dynamic portion of the hook name, `$adjacent`, refers to the type
    22622287     * of adjacency, 'next' or 'previous'.
     2288     *
     2289     * Possible hook names include:
     2290     *
     2291     *  - `next_post_link`
     2292     *  - `previous_post_link`
    22632293     *
    22642294     * @since 2.6.0
  • trunk/src/wp-includes/media.php

    r50274 r50505  
    34553455     * either 'next', or 'previous'.
    34563456     *
     3457     * Possible hook names include:
     3458     *
     3459     *  - `next_image_link`
     3460     *  - `previous_image_link`
     3461     *
    34573462     * @since 3.5.0
    34583463     *
  • trunk/src/wp-includes/post.php

    r50406 r50505  
    17731773     * the post type slug.
    17741774     *
     1775     * Possible hook names include:
     1776     *
     1777     *  - `post_type_labels_post`
     1778     *  - `post_type_labels_page`
     1779     *  - `post_type_labels_attachment`
     1780     *
    17751781     * @since 3.5.0
    17761782     *
     
    50325038     * refer to the new post status and post type, respectively.
    50335039     *
     5040     * Possible hook names include:
     5041     *
     5042     *  - `draft_post`
     5043     *  - `future_post`
     5044     *  - `pending_post`
     5045     *  - `private_post`
     5046     *  - `publish_post`
     5047     *  - `trash_post`
     5048     *  - `draft_page`
     5049     *  - `future_page`
     5050     *  - `pending_page`
     5051     *  - `private_page`
     5052     *  - `publish_page`
     5053     *  - `trash_page`
     5054     *  - `publish_attachment`
     5055     *  - `trash_attachment`
     5056     *
    50345057     * Please note: When this action is hooked using a particular post status (like
    50355058     * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is
  • 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`
  • 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`
  • trunk/src/wp-includes/taxonomy.php

    r50389 r50505  
    628628     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    629629     *
     630     * Possible hook names include:
     631     *
     632     *  - `taxonomy_labels_category`
     633     *  - `taxonomy_labels_post_tag`
     634     *
    630635     * @since 4.4.0
    631636     *
     
    20322037     * taxonomy the term belonged to.
    20332038     *
     2039     * Possible hook names include:
     2040     *
     2041     *  - `delete_category`
     2042     *  - `delete_post_tag`
     2043     *
    20342044     * @since 2.3.0
    20352045     * @since 4.5.0 Introduced the `$object_ids` argument.
     
    24752485     * to the slug of the taxonomy the term was created for.
    24762486     *
     2487     * Possible hook names include:
     2488     *
     2489     *  - `create_category`
     2490     *  - `create_post_tag`
     2491     *
    24772492     * @since 2.3.0
    24782493     *
     
    25132528     *
    25142529     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
     2530     *
     2531     * Possible hook names include:
     2532     *
     2533     *  - `created_category`
     2534     *  - `created_post_tag`
    25152535     *
    25162536     * @since 2.3.0
     
    25412561     *
    25422562     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
     2563     *
     2564     * Possible hook names include:
     2565     *
     2566     *  - `saved_category`
     2567     *  - `saved_post_tag`
    25432568     *
    25442569     * @since 5.5.0
     
    31873212     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    31883213     *
     3214     * Possible hook names include:
     3215     *
     3216     *  - `edit_category`
     3217     *  - `edit_post_tag`
     3218     *
    31893219     * @since 2.3.0
    31903220     *
     
    32183248     *
    32193249     * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
     3250     *
     3251     * Possible hook names include:
     3252     *
     3253     *  - `edited_category`
     3254     *  - `edited_post_tag`
    32203255     *
    32213256     * @since 2.3.0
  • trunk/src/wp-includes/template.php

    r48370 r50505  
    1717 * @since 1.5.0
    1818 *
    19  * @param string $type      Filename without extension.
    20  * @param array  $templates An optional list of template candidates
     19 * @param string   $type      Filename without extension.
     20 * @param string[] $templates An optional list of template candidates.
    2121 * @return string Full path to template file.
    2222 */
     
    3131     * Filters the list of template filenames that are searched for when retrieving a template to use.
    3232     *
     33     * The dynamic portion of the hook name, `$type`, refers to the filename -- minus the file
     34     * extension and any non-alphanumeric characters delimiting words -- of the file to load.
    3335     * The last element in the array should always be the fallback template for this query type.
    3436     *
    35      * Possible values for `$type` include: 'index', '404', 'archive', 'author', 'category', 'tag', 'taxonomy', 'date',
    36      * 'embed', 'home', 'frontpage', 'privacypolicy', 'page', 'paged', 'search', 'single', 'singular', and 'attachment'.
     37     * Possible hook names include:
     38     *
     39     *  - `404_template_hierarchy`
     40     *  - `archive_template_hierarchy`
     41     *  - `attachment_template_hierarchy`
     42     *  - `author_template_hierarchy`
     43     *  - `category_template_hierarchy`
     44     *  - `date_template_hierarchy`
     45     *  - `embed_template_hierarchy`
     46     *  - `frontpage_template_hierarchy`
     47     *  - `home_template_hierarchy`
     48     *  - `index_template_hierarchy`
     49     *  - `page_template_hierarchy`
     50     *  - `paged_template_hierarchy`
     51     *  - `privacypolicy_template_hierarchy`
     52     *  - `search_template_hierarchy`
     53     *  - `single_template_hierarchy`
     54     *  - `singular_template_hierarchy`
     55     *  - `tag_template_hierarchy`
     56     *  - `taxonomy_template_hierarchy`
    3757     *
    3858     * @since 4.7.0
    3959     *
    40      * @param array $templates A list of template candidates, in descending order of priority.
     60     * @param string[] $templates A list of template candidates, in descending order of priority.
    4161     */
    4262    $templates = apply_filters( "{$type}_template_hierarchy", $templates );
     
    5171     * This hook also applies to various types of files loaded as part of the Template Hierarchy.
    5272     *
    53      * Possible values for `$type` include: 'index', '404', 'archive', 'author', 'category', 'tag', 'taxonomy', 'date',
    54      * 'embed', 'home', 'frontpage', 'privacypolicy', 'page', 'paged', 'search', 'single', 'singular', and 'attachment'.
     73     * Possible hook names include:
     74     *
     75     *  - `404_template`
     76     *  - `archive_template`
     77     *  - `attachment_template`
     78     *  - `author_template`
     79     *  - `category_template`
     80     *  - `date_template`
     81     *  - `embed_template`
     82     *  - `frontpage_template`
     83     *  - `home_template`
     84     *  - `index_template`
     85     *  - `page_template`
     86     *  - `paged_template`
     87     *  - `privacypolicy_template`
     88     *  - `search_template`
     89     *  - `single_template`
     90     *  - `singular_template`
     91     *  - `tag_template`
     92     *  - `taxonomy_template`
    5593     *
    5694     * @since 1.5.0
    5795     * @since 4.8.0 The `$type` and `$templates` parameters were added.
    5896     *
    59      * @param string $template  Path to the template. See locate_template().
    60      * @param string $type      Sanitized filename without extension.
    61      * @param array $templates A list of template candidates, in descending order of priority.
     97     * @param string   $template  Path to the template. See locate_template().
     98     * @param string   $type      Sanitized filename without extension.
     99     * @param string[] $templates A list of template candidates, in descending order of priority.
    62100     */
    63101    return apply_filters( "{$type}_template", $template, $type, $templates );
  • trunk/src/wp-login.php

    r50153 r50505  
    431431 *
    432432 * The dynamic portion of the hook name, `$action`, refers to the action
    433  * that brought the visitor to the login form. Actions include 'postpass',
    434  * 'logout', 'lostpassword', etc.
     433 * that brought the visitor to the login form.
     434 *
     435 * Possible hook names include:
     436 *
     437 *  - 'login_form_checkemail'
     438 *  - 'login_form_confirm_admin_email'
     439 *  - 'login_form_confirmaction'
     440 *  - 'login_form_entered_recovery_mode'
     441 *  - 'login_form_login'
     442 *  - 'login_form_logout'
     443 *  - 'login_form_lostpassword'
     444 *  - 'login_form_postpass'
     445 *  - 'login_form_register'
     446 *  - 'login_form_resetpass'
     447 *  - 'login_form_retrievepassword'
     448 *  - 'login_form_rp'
    435449 *
    436450 * @since 2.8.0
Note: See TracChangeset for help on using the changeset viewer.