File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments