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 |
|---|---|
| 1082 | $results = $wpdb->get_results( $query ); |
| 1083 | wp_cache_set( $key, $results, 'posts' ); |
| 1084 | } |
| 1085 | if ( $results ) { |
| 1086 | foreach ( (array) $results as $result ) { |
| 1087 | if ( $result->post_date != '0000-00-00 00:00:00' ) { |
| 1088 | $url = get_permalink( $result ); |
| 1089 | if ( $result->post_title ) { |
| 1090 | /** This filter is documented in wp-includes/post-template.php */ |
| 1091 | $text = strip_tags( apply_filters( 'the_title', $result->post_title, $result->ID ) ); |
| 1092 | } else { |
| 1093 | $text = $result->ID; |
| 1094 | } |
| 1095 | $output .= get_archives_link($url, $text, $format, $before, $after); |
| 1096 | } |
| 1097 | } |
| 1098 | } |
| 1099 | } |
| 1100 | if ( $echo ) |
| Line | Code |
| 1271 | ."FROM $wpdb->posts " |
| 1272 | ."WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' " |
| 1273 | ."AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59' " |
| 1274 | ."AND post_type = 'post' AND post_status = 'publish'" |
| 1275 | ); |
| 1276 | if ( $ak_post_titles ) { |
| 1277 | foreach ( (array) $ak_post_titles as $ak_post_title ) { |
| 1278 | |
| 1279 | /** This filter is documented in wp-includes/post-template.php */ |
| 1280 | $post_title = esc_attr( apply_filters( 'the_title', $ak_post_title->post_title, $ak_post_title->ID ) ); |
| 1281 | |
| 1282 | if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) ) |
| 1283 | $ak_titles_for_day['day_'.$ak_post_title->dom] = ''; |
| 1284 | if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one |
| 1285 | $ak_titles_for_day["$ak_post_title->dom"] = $post_title; |
| 1286 | else |
| 1287 | $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . $post_title; |
| 1288 | } |
| 1289 | } |