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 |
---|---|
118 | } |
119 | if (!empty($day)) { |
120 | $title .= " $sep ".zeroise($day, 2); |
121 | } |
122 | } |
123 |
|
124 | // If there's a post |
125 | if ($single) { |
126 | $title = strip_tags(stripslashes($posts[0]->post_title)); |
127 | $title = apply_filters('single_post_title', $title); |
128 | } |
129 |
|
130 | // Send it out |
131 | if ($display && isset($title)) { |
132 | echo " $sep $title"; |
133 | } elseif (!$display && isset($title)) { |
134 | return " $sep $title"; |
135 | } |
136 | } |
137 |
|
138 | function single_post_title($prefix = '', $display = true) { |
139 | global $p, $name, $wpdb, $tableposts; |
140 | if (intval($p) || '' != $name) { |
141 | if (!$p) { |
142 | $p = $wpdb->get_var("SELECT ID FROM $tableposts WHERE post_name = '$name'"); |
143 | } |
144 | $post_data = get_postdata($p); |
145 | $title = $post_data['Title']; |
146 | $title = apply_filters('single_post_title', $title); |
147 | if ($display) { |
148 | echo $prefix.strip_tags(stripslashes($title)); |
149 | } else { |
150 | return strip_tags(stripslashes($title)); |
151 | } |
152 | } |
153 | } |
154 |
|
155 | function single_cat_title($prefix = '', $display = true ) { |