Skip to content

Commit 6d1558e

Browse files
committed
Inline documentation for hooks in wp-includes/category.php.
Props ben.moody Fixes #25503. git-svn-id: https://develop.svn.wordpress.org/trunk@25724 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c58e5ca commit 6d1558e

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

src/wp-includes/category.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@ function get_categories( $args = '' ) {
4040
$defaults = array( 'taxonomy' => 'category' );
4141
$args = wp_parse_args( $args, $defaults );
4242

43-
$taxonomy = apply_filters( 'get_categories_taxonomy', $args['taxonomy'], $args );
43+
$taxonomy = $args['taxonomy'];
44+
/**
45+
* Filter the taxonomy used to retrieve terms when calling get_categories().
46+
*
47+
* @since 2.7.0
48+
*
49+
* @param string $taxonomy Taxonomy to retrieve terms from.
50+
* @param array $args An array of arguments. @see get_terms()
51+
*/
52+
$taxonomy = apply_filters( 'get_categories_taxonomy', $taxonomy, $args );
4453

4554
// Back compat
4655
if ( isset($args['type']) && 'link' == $args['type'] ) {
@@ -262,7 +271,15 @@ function get_tags( $args = '' ) {
262271
$return = array();
263272
return $return;
264273
}
265-
274+
275+
/**
276+
* Filter the array of term objects returned for the 'post_tag' taxonomy.
277+
*
278+
* @since 2.3.0
279+
*
280+
* @param array $tags Array of 'post_tag' term objects.
281+
* @param array $args An array of arguments. @see get_terms()
282+
*/
266283
$tags = apply_filters( 'get_tags', $tags, $args );
267284
return $tags;
268285
}

0 commit comments

Comments
 (0)