WP hooks navigation: Home/browse • Actions index • Filters index
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 |
---|---|
990 | break; |
991 | case 'names': |
992 | $selects = array('t.term_id', 'tt.parent', 'tt.count', 't.name'); |
993 | break; |
994 | case 'count': |
995 | $orderby = ''; |
996 | $order = ''; |
997 | $selects = array('COUNT(*)'); |
998 | } |
999 | $select_this = implode(', ', apply_filters( 'get_terms_fields', $selects, $args )); |
1000 |
|
1001 | $query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ($in_taxonomies) $where $orderby $order $limit"; |
1002 |
|
1003 | if ( 'count' == $fields ) { |
1004 | $term_count = $wpdb->get_var($query); |
1005 | return $term_count; |
1006 | } |
1007 |
|
1008 | $terms = $wpdb->get_results($query); |