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
1337                $results = $wpdb->get_results( $query );
1338                wp_cache_set( $key, $results, 'posts' );
1339           }
1340           if ( $results ) {
1341                foreach ( (array) $results as $result ) {
1342                     if ( $result->post_date != '0000-00-00 00:00:00' ) {
1343                          $url  = get_permalink( $result );
1344                          if ( $result->post_title ) {
1345                               /** This filter is documented in wp-includes/post-template.php */
1346                               $text = strip_tags( apply_filters( 'the_title', $result->post_title, $result->ID ) );
1347                          } else {
1348                               $text = $result->ID;
1349                          }
1350                          $output .= get_archives_link($url, $text, $format, $before, $after);
1351                     }
1352                }
1353           }
1354      }
1355      if ( $echo )
 
Line Code
1528           ."FROM $wpdb->posts "
1529           ."WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' "
1530           ."AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59' "
1531           ."AND post_type = 'post' AND post_status = 'publish'"
1532      );
1533      if ( $ak_post_titles ) {
1534           foreach ( (array) $ak_post_titles as $ak_post_title ) {
1535
1536                     /** This filter is documented in wp-includes/post-template.php */
1537                     $post_title = esc_attr( apply_filters( 'the_title', $ak_post_title->post_title, $ak_post_title->ID ) );
1538
1539                     if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) )
1540                          $ak_titles_for_day['day_'.$ak_post_title->dom] = '';
1541                     if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one
1542                          $ak_titles_for_day["$ak_post_title->dom"] = $post_title;
1543                     else
1544                          $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . $post_title;
1545           }
1546      }