mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Add filter to get_categories(), props Malaiac, fixes #7427
git-svn-id: http://svn.automattic.com/wordpress/trunk@9080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7f61fd6389
commit
14dddc912b
@ -40,7 +40,7 @@ function &get_categories( $args = '' ) {
|
|||||||
$defaults = array( 'type' => 'category' );
|
$defaults = array( 'type' => 'category' );
|
||||||
$args = wp_parse_args( $args, $defaults );
|
$args = wp_parse_args( $args, $defaults );
|
||||||
|
|
||||||
$taxonomy = 'category';
|
$taxonomy = apply_filters( 'get_categories_taxonomy', 'category', $args );
|
||||||
if ( 'link' == $args['type'] )
|
if ( 'link' == $args['type'] )
|
||||||
$taxonomy = 'link_category';
|
$taxonomy = 'link_category';
|
||||||
$categories = (array) get_terms( $taxonomy, $args );
|
$categories = (array) get_terms( $taxonomy, $args );
|
||||||
|
Loading…
Reference in New Issue
Block a user