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.
Built from https://develop.svn.wordpress.org/trunk@30210


git-svn-id: http://core.svn.wordpress.org/trunk@30210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2014-11-03 18:49:45 +00:00
parent eec3eea392
commit 7919a6d812
2 changed files with 16 additions and 15 deletions

View File

@ -4134,17 +4134,15 @@ function get_term_link( $term, $taxonomy = '') {
* @since 2.5.0
*
* @param array $args {
* Arguments about which post to use and how to format the output.
* Arguments about which post to use and how to format the output. Shares all of the arguments supported by
* {@link get_the_taxonomies()}, in addition to the following.
*
* @type int|WP_Post $post Post ID or object to get taxonomies of. Default current post.
* @type string $before Displays before the taxonomies. Default empty string.
* @type string $sep Separates each taxonomy. Default is a space.
* @type string $after Displays after the taxonomies. Default empty string.
* @type string $template Template for displaying a taxonomy label and list of
* terms. Default is "Label: Terms."
* @type string $term_template Template for displaying a single term in the list.
* Default is the term name linked to its archive.
* }
* @param array $args See {@link get_the_taxonomies()} for a description of arguments and their defaults.
*/
function the_taxonomies( $args = array() ) {
$defaults = array(
@ -4152,10 +4150,6 @@ function the_taxonomies( $args = array() ) {
'before' => '',
'sep' => ' ',
'after' => '',
/* translators: %s: taxonomy label, %l: list of terms formatted as per $term_template */
'template' => __( '%s: %l.' ),
/* translators: %1$s: term link, %2$s: term name */
'term_template' => '<a href="%1$s">%2$s</a>',
);
$r = wp_parse_args( $args, $defaults );
@ -4172,7 +4166,14 @@ function the_taxonomies( $args = array() ) {
* @since 2.5.0
*
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
* @param array $args Override the defaults.
* @param array $args {
* Arguments about how to format the list of taxonomies.
*
* @type string $template Template for displaying a taxonomy label and list of terms.
* Default is "Label: Terms."
* @type string $term_template Template for displaying a single term in the list. Default is the term name
* linked to its archive.
* }
* @return array List of taxonomies.
*/
function get_the_taxonomies( $post = 0, $args = array() ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-alpha-30209';
$wp_version = '4.1-alpha-30210';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.