Make WordPress Core

Changeset 54957


Ignore:
Timestamp:
12/12/2022 11:15:12 AM (22 months ago)
Author:
SergeyBiryukov
Message:

Docs: Improve DocBlock formatting for get_post_class().

Follow-up to [9273], [27429], [31271], [37544].

See #56792.

File:
1 edited

Legend:

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

    r54956 r54957  
    466466 * Retrieves an array of the class names for the post container element.
    467467 *
    468  * The class names are many. If the post is a sticky, then the 'sticky'
    469  * class name. The class 'hentry' is always added to each post. If the post has a
    470  * post thumbnail, 'has-post-thumbnail' is added as a class. For each taxonomy that
    471  * the post belongs to, a class will be added of the format '{$taxonomy}-{$slug}' -
    472  * eg 'category-foo' or 'my_custom_taxonomy-bar'.
    473  *
    474  * The 'post_tag' taxonomy is a special
    475  * case; the class has the 'tag-' prefix instead of 'post_tag-'. All class names are
    476  * passed through the filter, {@see 'post_class'}, with the list of class names, followed by
    477  * $css_class parameter value, with the post ID as the last parameter.
     468 * The class names are many:
     469 *
     470 *  - If the post has a post thumbnail, `has-post-thumbnail` is added as a class.
     471 *  - If the post is sticky, then the `sticky` class name is added.
     472 *  - The class `hentry` is always added to each post.
     473 *  - For each taxonomy that the post belongs to, a class will be added of the format
     474 *    `{$taxonomy}-{$slug}`, e.g. `category-foo` or `my_custom_taxonomy-bar`.
     475 *    The `post_tag` taxonomy is a special case; the class has the `tag-` prefix
     476 *    instead of `post_tag-`.
     477 *
     478 * All class names are passed through the filter, {@see 'post_class'}, followed by
     479 * `$css_class` parameter value, with the post ID as the last parameter.
    478480 *
    479481 * @since 2.7.0
Note: See TracChangeset for help on using the changeset viewer.