Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: the_title

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

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