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
1555                $results = $wpdb->get_results( $query );
1556                wp_cache_set( $key, $results, 'posts' );
1557           }
1558           if ( $results ) {
1559                foreach ( (array) $results as $result ) {
1560                     if ( $result->post_date != '0000-00-00 00:00:00' ) {
1561                          $url = get_permalink( $result );
1562                          if ( $result->post_title ) {
1563                               /** This filter is documented in wp-includes/post-template.php */
1564                               $text = strip_tags( apply_filters( 'the_title', $result->post_title, $result->ID ) );
1565                          } else {
1566                               $text = $result->ID;
1567                          }
1568                          $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
1569                     }
1570                }
1571           }
1572      }
1573      if ( $r['echo'] ) {
 
Line Code
1752           ."FROM $wpdb->posts "
1753           ."WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' "
1754           ."AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59' "
1755           ."AND post_type = 'post' AND post_status = 'publish'"
1756      );
1757      if ( $ak_post_titles ) {
1758           foreach ( (array) $ak_post_titles as $ak_post_title ) {
1759
1760                     /** This filter is documented in wp-includes/post-template.php */
1761                     $post_title = esc_attr( apply_filters( 'the_title', $ak_post_title->post_title, $ak_post_title->ID ) );
1762
1763                     if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) )
1764                          $ak_titles_for_day['day_'.$ak_post_title->dom] = '';
1765                     if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one
1766                          $ak_titles_for_day["$ak_post_title->dom"] = $post_title;
1767                     else
1768                          $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . $post_title;
1769           }
1770      }