Make WordPress Core


Ignore:
Timestamp:
05/22/2011 10:30:05 PM (14 years ago)
Author:
nacin
Message:

Code readability improvements. props niallkennedy, fixes #17166, #17182, #17231, #16474.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r17966 r17989  
    2929        $templates[] = "header-{$name}.php";
    3030
    31     $templates[] = "header.php";
     31    $templates[] = 'header.php';
    3232
    3333    // Backward compat code will be removed in a future release
     
    5858        $templates[] = "footer-{$name}.php";
    5959
    60     $templates[] = "footer.php";
     60    $templates[] = 'footer.php';
    6161
    6262    // Backward compat code will be removed in a future release
     
    8787        $templates[] = "sidebar-{$name}.php";
    8888
    89     $templates[] = "sidebar.php";
     89    $templates[] = 'sidebar.php';
    9090
    9191    // Backward compat code will be removed in a future release
     
    570570        $my_month = $wp_locale->get_month(substr($m, 4, 2));
    571571        $my_day = intval(substr($m, 6, 2));
    572         $title = $my_year . ($my_month ? $t_sep . $my_month : "") . ($my_day ? $t_sep . $my_day : "");
     572        $title = $my_year . ( $my_month ? $t_sep . $my_month : '' ) . ( $my_day ? $t_sep . $my_day : '' );
    573573    }
    574574
     
    844844        $link_html = "\t$before<a href='$url' title='$title_text'>$text</a>$after\n";
    845845
    846     $link_html = apply_filters( "get_archives_link", $link_html );
     846    $link_html = apply_filters( 'get_archives_link', $link_html );
    847847
    848848    return $link_html;
     
    916916
    917917    //filters
    918     $where = apply_filters('getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r );
    919     $join = apply_filters('getarchives_join', "", $r);
     918    $where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r );
     919    $join = apply_filters( 'getarchives_join', '', $r );
    920920
    921921    $output = '';
     
    10171017        }
    10181018    } elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) {
    1019         $orderby = ('alpha' == $type) ? "post_title ASC " : "post_date DESC ";
     1019        $orderby = ('alpha' == $type) ? 'post_title ASC ' : 'post_date DESC ';
    10201020        $query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit";
    10211021        $key = md5($query);
     
    12491249
    12501250        if ( in_array($day, $daywithpost) ) // any posts today?
    1251                 $calendar_output .= '<a href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\"" . esc_attr($ak_titles_for_day[$day]) . "\">$day</a>";
     1251                $calendar_output .= '<a href="' . get_day_link( $thisyear, $thismonth, $day ) . '" title="' . esc_attr( $ak_titles_for_day[ $day ] ) . "\">$day</a>";
    12521252        else
    12531253            $calendar_output .= $day;
     
    19981998            $link = add_query_arg( $add_args, $link );
    19991999        $link .= $add_fragment;
    2000         $page_links[] = "<a class='prev page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>$prev_text</a>";
     2000        $page_links[] = '<a class="prev page-numbers" href="' . esc_url( apply_filters( 'paginate_links', $link ) ) . '">' . $prev_text . '</a>';
    20012001    endif;
    20022002    for ( $n = 1; $n <= $total; $n++ ) :
     
    20152015                $dots = true;
    20162016            elseif ( $dots && !$show_all ) :
    2017                 $page_links[] = "<span class='page-numbers dots'>...</span>";
     2017                $page_links[] = '<span class="page-numbers dots">...</span>';
    20182018                $dots = false;
    20192019            endif;
     
    20262026            $link = add_query_arg( $add_args, $link );
    20272027        $link .= $add_fragment;
    2028         $page_links[] = "<a class='next page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>$next_text</a>";
     2028        $page_links[] = '<a class="next page-numbers" href="' . esc_url( apply_filters( 'paginate_links', $link ) ) . '">' . $next_text . '</a>';
    20292029    endif;
    20302030    switch ( $type ) :
Note: See TracChangeset for help on using the changeset viewer.