Make WordPress Core


Ignore:
Timestamp:
05/07/2018 05:19:48 PM (9 years ago)
Author:
johnbillion
Message:

Docs: Update and correct various inline documentation.

See #42505, #41756

File:
1 edited

Legend:

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

    r42843 r43177  
    430430
    431431/**
    432  * Display the classes for the post div.
     432 * Displays the classes for the post container element.
    433433 *
    434434 * @since 2.7.0
    … …  
    443443
    444444/**
    445  * Retrieves the classes for the post div as an array.
     445 * Retrieves an array of the class names for the post container element.
    446446 *
    447447 * The class names are many. If the post is a sticky, then the 'sticky'
    … …  
    452452 *
    453453 * The 'post_tag' taxonomy is a special
    454  * case; the class has the 'tag-' prefix instead of 'post_tag-'. All classes are
    455  * passed through the filter, {@see 'post_class'}, with the list of classes, followed by
     454 * case; the class has the 'tag-' prefix instead of 'post_tag-'. All class names are
     455 * passed through the filter, {@see 'post_class'}, with the list of class names, followed by
    456456 * $class parameter value, with the post ID as the last parameter.
    457457 *
    458458 * @since 2.7.0
    459  * @since 4.2.0 Custom taxonomy classes were added.
    460  *
    461  * @param string|array $class   One or more classes to add to the class list.
    462  * @param int|WP_Post  $post_id Optional. Post ID or post object.
    463  * @return array Array of classes.
     459 * @since 4.2.0 Custom taxonomy class names were added.
     460 *
     461 * @param string|string[] $class   Space-separated string or array of class names to add to the class list.
     462 * @param int|WP_Post     $post_id Optional. Post ID or post object.
     463 * @return string[] Array of class names.
    464464 */
    465465function get_post_class( $class = '', $post_id = null ) {
    … …  
    553553
    554554        /**
    555          * Filters the list of CSS classes for the current post.
     555         * Filters the list of CSS class names for the current post.
    556556         *
    557557         * @since 2.7.0
    558558         *
    559          * @param array $classes An array of post classes.
    560          * @param array $class   An array of additional classes added to the post.
    561          * @param int   $post_id The post ID.
     559         * @param string[] $classes An array of post class names.
     560         * @param string[] $class   An array of additional class names added to the post.
     561         * @param int      $post_id The post ID.
    562562         */
    563563        $classes = apply_filters( 'post_class', $classes, $class, $post->ID );
    … …  
    567567
    568568/**
    569  * Display the classes for the body element.
     569 * Displays the class names for the body element.
    570570 *
    571571 * @since 2.8.0
    572572 *
    573  * @param string|array $class One or more classes to add to the class list.
     573 * @param string|string[] $class Space-separated string or array of class names to add to the class list.
    574574 */
    575575function body_class( $class = '' ) {
    576         // Separates classes with a single space, collates classes for body element
     576        // Separates class names with a single space, collates class names for body element
    577577        echo 'class="' . join( ' ', get_body_class( $class ) ) . '"';
    578578}
    579579
    580580/**
    581  * Retrieve the classes for the body element as an array.
     581 * Retrieves an array of the class names for the body element.
    582582 *
    583583 * @since 2.8.0
    … …  
    585585 * @global WP_Query $wp_query
    586586 *
    587  * @param string|array $class One or more classes to add to the class list.
    588  * @return array Array of classes.
     587 * @param string|string[] $class Space-separated string or array of class names to add to the class list.
     588 * @return string[] Array of class names.
    589589 */
    590590function get_body_class( $class = '' ) {
    … …  
    801801
    802802        /**
    803          * Filters the list of CSS body classes for the current post or page.
     803         * Filters the list of CSS body class names for the current post or page.
    804804         *
    805805         * @since 2.8.0
    806806         *
    807          * @param array $classes An array of body classes.
    808          * @param array $class   An array of additional classes added to the body.
     807         * @param string[] $classes An array of body class names.
     808         * @param string[] $class   An array of additional class names added to the body.
    809809         */
    810810        $classes = apply_filters( 'body_class', $classes, $class );
Note: See TracChangeset for help on using the changeset viewer.