To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 34 | * @link http://codex.wordpress.org/Function_Reference/get_categories |
| 35 | * |
| 36 | * @param string|array $args Optional. Change the defaults retrieving categories. |
| 37 | * @return array List of categories. |
| 38 | */ |
| 39 | function &get_categories( $args = '' ) { |
| 40 | $defaults = array( 'taxonomy' => 'category' ); |
| 41 | $args = wp_parse_args( $args, $defaults ); |
| 42 | |
| 43 | $taxonomy = apply_filters( 'get_categories_taxonomy', $args['taxonomy'], $args ); |
| 44 | |
| 45 | // Back compat |
| 46 | if ( isset($args['type']) && 'link' == $args['type'] ) { |
| 47 | _deprecated_argument( __FUNCTION__, '3.0', '' ); |
| 48 | $taxonomy = $args['taxonomy'] = 'link_category'; |
| 49 | } |
| 50 | |
| 51 | $categories = (array) get_terms( $taxonomy, $args ); |
| 52 | |