WordPress.org

Make WordPress Core

Changeset 43177


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

Docs: Update and correct various inline documentation.

See #42505, #41756

Location:
trunk/src
Files:
5 edited

Legend:

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

    r42343 r43177  
    99
    1010/**
    11  * Fetch an instance of a WP_List_Table class.
     11 * Fetches an instance of a WP_List_Table class.
    1212 *
    1313 * @access private
     
    1717 *
    1818 * @param string $class The type of the list table, which is the class name.
    19  * @param array $args Optional. Arguments to pass to the class. Accepts 'screen'.
    20  * @return object|bool Object on success, false if the class does not exist.
     19 * @param array  $args Optional. Arguments to pass to the class. Accepts 'screen'.
     20 * @return WP_List_Table|bool List table object on success, false if the class does not exist.
    2121 */
    2222function _get_list_table( $class, $args = array() ) {
  • trunk/src/wp-admin/includes/ms.php

    r42875 r43177  
    674674
    675675/**
    676  * Synchronize category and post tag slugs when global terms are enabled.
    677  *
    678  * @since 3.0.0
    679  *
    680  * @param object $term     The term.
    681  * @param string $taxonomy The taxonomy for `$term`. Should be 'category' or 'post_tag', as these are
    682  *                         the only taxonomies which are processed by this function; anything else
    683  *                         will be returned untouched.
    684  * @return object|array Returns `$term`, after filtering the 'slug' field with sanitize_title()
    685  *                      if $taxonomy is 'category' or 'post_tag'.
     676 * Synchronizes category and post tag slugs when global terms are enabled.
     677 *
     678 * @since 3.0.0
     679 *
     680 * @param WP_Term|array $term     The term.
     681 * @param string        $taxonomy The taxonomy for `$term`. Should be 'category' or 'post_tag', as these are
     682 *                                the only taxonomies which are processed by this function; anything else
     683 *                                will be returned untouched.
     684 * @return WP_Term|array Returns `$term`, after filtering the 'slug' field with `sanitize_title()`
     685 *                       if `$taxonomy` is 'category' or 'post_tag'.
    686686 */
    687687function sync_category_tag_slugs( $term, $taxonomy ) {
  • trunk/src/wp-includes/class-wp-post.php

    r42746 r43177  
    353353     *
    354354     * @param string $filter Filter.
    355      * @return self|array|bool|object|WP_Post
     355     * @return array|bool|object|WP_Post
    356356     */
    357357    public function filter( $filter ) {
  • 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 );
  • trunk/src/wp-includes/taxonomy.php

    r42871 r43177  
    811811
    812812    /**
    813      * Filters a term.
     813     * Filters a taxonomy term object.
    814814     *
    815815     * @since 2.3.0
    816      * @since 4.4.0 `$_term` can now also be a WP_Term object.
    817      *
    818      * @param int|WP_Term $_term    Term object or ID.
    819      * @param string      $taxonomy The taxonomy slug.
     816     * @since 4.4.0 `$_term` is now a `WP_Term` object.
     817     *
     818     * @param WP_Term $_term    Term object.
     819     * @param string  $taxonomy The taxonomy slug.
    820820     */
    821821    $_term = apply_filters( 'get_term', $_term, $taxonomy );
    822822
    823823    /**
    824      * Filters a taxonomy.
     824     * Filters a taxonomy term object.
    825825     *
    826826     * The dynamic portion of the filter name, `$taxonomy`, refers
    827      * to the taxonomy slug.
     827     * to the slug of the term's taxonomy.
    828828     *
    829829     * @since 2.3.0
    830      * @since 4.4.0 `$_term` can now also be a WP_Term object.
    831      *
    832      * @param int|WP_Term $_term    Term object or ID.
    833      * @param string      $taxonomy The taxonomy slug.
     830     * @since 4.4.0 `$_term` is now a `WP_Term` object.
     831     *
     832     * @param WP_Term $_term    Term object.
     833     * @param string  $taxonomy The taxonomy slug.
    834834     */
    835835    $_term = apply_filters( "get_{$taxonomy}", $_term, $taxonomy );
Note: See TracChangeset for help on using the changeset viewer.