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 |
---|---|
224 | if ( !empty($monthnum) ) |
225 | $title .= " $sep " . $wp_locale->get_month($monthnum); |
226 | if ( !empty($day) ) |
227 | $title .= " $sep " . zeroise($day, 2); |
228 | } |
229 |
|
230 | // If there is a post |
231 | if ( is_single() || is_page() ) { |
232 | $post = $wp_query->get_queried_object(); |
233 | $title = strip_tags( apply_filters( 'single_post_title', $post->post_title ) ); |
234 | } |
235 |
|
236 | // If there's a taxonomy |
237 | if ( is_tax() ) { |
238 | $taxonomy = get_query_var( 'taxonomy' ); |
239 | $tax = get_taxonomy( $taxonomy ); |
240 | $tax = $tax->label; |
241 | $term = $wp_query->get_queried_object(); |
242 | $term = $term->name; |
Line | Code |
271 | global $wpdb; |
272 | $p = get_query_var('p'); |
273 | $name = get_query_var('name'); |
274 |
|
275 | if ( intval($p) || '' != $name ) { |
276 | if ( !$p ) |
277 | $p = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_name = %s", $name)); |
278 | $post = & get_post($p); |
279 | $title = $post->post_title; |
280 | $title = apply_filters('single_post_title', $title); |
281 | if ( $display ) |
282 | echo $prefix.strip_tags($title); |
283 | else |
284 | return strip_tags($title); |
285 | } |
286 | } |
287 |
|
288 |
|
289 | function single_cat_title($prefix = '', $display = true ) { |