WordPress.org

Make WordPress Core

Changeset 30210


Ignore:
Timestamp:
11/03/2014 06:48:50 PM (6 years ago)
Author:
boonebgorges
Message:

Improve docblocks for get_the_taxonomies() and the_taxonomies().

  • In the_taxonomies(), only document those arguments that are specific to the function. Arguments shared with get_the_taxonomies() should be documented in the later function's docblock.
  • Add $args hash documentation to get_the_taxonomies().
  • Remove the redundant default argument definition in the_taxonomies().

Fixes #27238.

File:
1 edited

Legend:

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

    r30209 r30210  
    41354135 *
    41364136 * @param array $args {
    4137  *     Arguments about which post to use and how to format the output.
    4138  *
    4139  *     @type  int|WP_Post $post          Post ID or object to get taxonomies of. Default current post.
    4140  *     @type  string      $before        Displays before the taxonomies. Default empty string.
    4141  *     @type  string      $sep           Separates each taxonomy. Default is a space.
    4142  *     @type  string      $after         Displays after the taxonomies. Default empty string.
    4143  *     @type  string      $template      Template for displaying a taxonomy label and list of
    4144  *                                       terms. Default is "Label: Terms."
    4145  *     @type  string      $term_template Template for displaying a single term in the list.
    4146  *                                       Default is the term name linked to its archive.
     4137 *     Arguments about which post to use and how to format the output. Shares all of the arguments supported by
     4138 *     {@link get_the_taxonomies()}, in addition to the following.
     4139 *
     4140 *     @type  int|WP_Post $post   Post ID or object to get taxonomies of. Default current post.
     4141 *     @type  string      $before Displays before the taxonomies. Default empty string.
     4142 *     @type  string      $sep    Separates each taxonomy. Default is a space.
     4143 *     @type  string      $after  Displays after the taxonomies. Default empty string.
    41474144 * }
     4145 * @param array $args See {@link get_the_taxonomies()} for a description of arguments and their defaults.
    41484146 */
    41494147function the_taxonomies( $args = array() ) {
     
    41534151        'sep' => ' ',
    41544152        'after' => '',
    4155         /* translators: %s: taxonomy label, %l: list of terms formatted as per $term_template */
    4156         'template' => __( '%s: %l.' ),
    4157         /* translators: %1$s: term link, %2$s: term name */
    4158         'term_template' => '<a href="%1$s">%2$s</a>',
    41594153    );
    41604154
     
    41734167 *
    41744168 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
    4175  * @param array $args Override the defaults.
     4169 * @param array $args {
     4170 *     Arguments about how to format the list of taxonomies.
     4171 *
     4172 *     @type string $template      Template for displaying a taxonomy label and list of terms.
     4173 *                                 Default is "Label: Terms."
     4174 *     @type string $term_template Template for displaying a single term in the list. Default is the term name
     4175 *                                 linked to its archive.
     4176 * }
    41764177 * @return array List of taxonomies.
    41774178 */
Note: See TracChangeset for help on using the changeset viewer.