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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
36 | $catlink = str_replace('%category%', $category_nicename, $catlink); |
37 | $catlink = get_settings('home') . trailingslashit($catlink); |
38 | } |
39 | return apply_filters('category_link', $catlink, $category_id); |
40 | } |
41 |
|
42 | function get_the_category_list($separator = '', $parents='') { |
43 | $categories = get_the_category(); |
44 | if (empty($categories)) |
45 | return apply_filters('the_category', __('Uncategorized'), $separator, $parents); |
46 |
|
47 | $thelist = ''; |
48 | if ( '' == $separator ) { |
49 | $thelist .= '<ul class="post-categories">'; |
50 | foreach ( $categories as $category ) { |
51 | $category->cat_name = $category->cat_name; |
52 | $thelist .= "\n\t<li>"; |
53 | switch ( strtolower($parents) ) { |
54 | case 'multiple': |
Line | Code |
87 | $thelist .= "$category->cat_name</a>"; |
88 | break; |
89 | case '': |
90 | default: |
91 | $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a>'; |
92 | } |
93 | ++$i; |
94 | } |
95 | } |
96 | return apply_filters('the_category', $thelist, $separator, $parents); |
97 | } |
98 |
|
99 | function the_category($separator = '', $parents='') { |
100 | echo get_the_category_list($separator, $parents); |
101 | } |
102 |
|
103 | function get_the_category_by_ID($cat_ID) { |
104 | $cat_ID = (int) $cat_ID; |
105 | $category = &get_category($cat_ID); |