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 |
---|---|
1026 | wp_cache_set( 'wp_get_archives', $cache, 'general' ); |
1027 | } else { |
1028 | $arcresults = $cache[ $key ]; |
1029 | } |
1030 | if ( $arcresults ) { |
1031 | foreach ( (array) $arcresults as $arcresult ) { |
1032 | if ( $arcresult->post_date != '0000-00-00 00:00:00' ) { |
1033 | $url = get_permalink( $arcresult ); |
1034 | if ( $arcresult->post_title ) |
1035 | $text = strip_tags( apply_filters( 'the_title', $arcresult->post_title, $arcresult->ID ) ); |
1036 | else |
1037 | $text = $arcresult->ID; |
1038 | $output .= get_archives_link($url, $text, $format, $before, $after); |
1039 | } |
1040 | } |
1041 | } |
1042 | } |
1043 | if ( $echo ) |
1044 | echo $output; |
Line | Code |
1212 | $ak_post_titles = $wpdb->get_results("SELECT ID, post_title, DAYOFMONTH(post_date) as dom " |
1213 | ."FROM $wpdb->posts " |
1214 | ."WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' " |
1215 | ."AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59' " |
1216 | ."AND post_type = 'post' AND post_status = 'publish'" |
1217 | ); |
1218 | if ( $ak_post_titles ) { |
1219 | foreach ( (array) $ak_post_titles as $ak_post_title ) { |
1220 |
|
1221 | $post_title = esc_attr( apply_filters( 'the_title', $ak_post_title->post_title, $ak_post_title->ID ) ); |
1222 |
|
1223 | if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) ) |
1224 | $ak_titles_for_day['day_'.$ak_post_title->dom] = ''; |
1225 | if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one |
1226 | $ak_titles_for_day["$ak_post_title->dom"] = $post_title; |
1227 | else |
1228 | $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . $post_title; |
1229 | } |
1230 | } |