Make WordPress Core

Changeset 60271


Ignore:
Timestamp:
06/01/2025 07:20:42 AM (9 months ago)
Author:
audrasjb
Message:

Docs: Improve inline docs params for various category template tags functions.

Props dilipbheda, audrasjb, mukesh27.
Fixes #63225.
See #63166.

File:
1 edited

Legend:

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

    r56695 r60271  
    7272 * @since 0.71
    7373 *
    74  * @param int $post_id Optional. The post ID. Defaults to current post ID.
     74 * @param int|false $post_id Optional. The post ID. Defaults to current post ID.
    7575 * @return WP_Term[] Array of WP_Term objects, one for each category assigned to the post.
    7676 */
     
    132132 * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
    133133 *
    134  * @param string $separator Optional. Separator between the categories. By default, the links are placed
    135  *                          in an unordered list. An empty string will result in the default behavior.
    136  * @param string $parents   Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
    137  *                          Default empty string.
    138  * @param int    $post_id   Optional. ID of the post to retrieve categories for. Defaults to the current post.
     134 * @param string    $separator Optional. Separator between the categories. By default, the links are placed
     135 *                             in an unordered list. An empty string will result in the default behavior.
     136 * @param string    $parents   Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
     137 *                             Default empty string.
     138 * @param int|false $post_id   Optional. ID of the post to retrieve categories for. Defaults to the current post.
    139139 * @return string Category list for a post.
    140140 */
     
    252252 * @param int|string|int[]|string[] $category Category ID, name, slug, or array of such
    253253 *                                            to check against.
    254  * @param int|WP_Post               $post     Optional. Post to check. Defaults to the current post.
     254 * @param int|null|WP_Post          $post     Optional. Post to check. Defaults to the current post.
    255255 * @return bool True if the current post is in any of the given categories.
    256256 */
     
    268268 * @since 0.71
    269269 *
    270  * @param string $separator Optional. Separator between the categories. By default, the links are placed
    271  *                          in an unordered list. An empty string will result in the default behavior.
    272  * @param string $parents   Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
    273  *                          Default empty string.
    274  * @param int    $post_id   Optional. ID of the post to retrieve categories for. Defaults to the current post.
     270 * @param string    $separator Optional. Separator between the categories. By default, the links are placed
     271 *                             in an unordered list. An empty string will result in the default behavior.
     272 * @param string    $parents   Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
     273 *                             Default empty string.
     274 * @param int|false $post_id   Optional. ID of the post to retrieve categories for. Defaults to the current post.
    275275 */
    276276function the_category( $separator = '', $parents = '', $post_id = false ) {
Note: See TracChangeset for help on using the changeset viewer.