Make WordPress Core

Changeset 1491


Ignore:
Timestamp:
07/28/2004 02:43:54 AM (20 years ago)
Author:
rboren
Message:

Support timestamp permalinks. Make wider use of is_single(). Bug 0000194.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r1455 r1491  
    150150
    151151if (1 == count($posts)) {
    152     if ($p || $name) {
     152    if (is_single()) {
    153153        $more = 1;
    154154        $single = 1;
  • trunk/wp-includes/classes.php

    r1490 r1491  
    6666        }
    6767
     68        // If year, month, day, hour, minute, and second are set, a single
     69        // post is being queried.       
     70        if (('' != $hour) && ('' != $minute) &&('' != $second) && ('' != $year) && ('' != $monthnum) && ('' != $day)) {
     71            $this->single = true;
     72        }
     73
    6874        if (!empty($s)) {
    6975            $this->search = true;
  • trunk/wp-includes/functions.php

    r1489 r1491  
    12491249
    12501250        $post = 0;
    1251         if (strstr($struct, '%postname%') || strstr($struct, '%post_id%')) {
     1251        if (strstr($struct, '%postname%') || strstr($struct, '%post_id%')
     1252            || (strstr($struct, '%year%') &&  strstr($struct, '%monthnum%') && strstr($struct, '%day%') && strstr($struct, '%hour%') && strstr($struct, '%minute') && strstr($struct, '%second%'))) {
    12521253                $post = 1;
    12531254                $trackbackmatch = $match . $trackbackregex;
  • trunk/wp-includes/template-functions-comment.php

    r1435 r1491  
    1818
    1919function comments_template() {
    20     global $withcomments, $single, $post, $wpdb, $id, $comment, $cookiehash;
    21 
    22     if ( $single || $withcomments ) :
     20    global $withcomments, $post, $wpdb, $id, $comment, $cookiehash;
     21
     22    if ( is_single() || $withcomments ) :
    2323        $req = get_settings('require_name_email');
    2424        $comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_'.$cookiehash])) : '';
     
    7272    global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $cookiehash;
    7373    global $querystring_start, $querystring_equal, $querystring_separator;
    74     global $comment_count_cache, $single;
    75     if (!$single) {
     74    global $comment_count_cache;
     75
     76    if (! is_single()) {
    7677    if ('' == $comment_count_cache["$id"]) {
    7778        $number = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1';");
  • trunk/wp-includes/template-functions-general.php

    r1460 r1491  
    9999function wp_title($sep = '»', $display = true) {
    100100    global $wpdb;
    101     global $m, $year, $monthnum, $day, $cat, $p, $name, $month, $posts, $single;
     101    global $m, $year, $monthnum, $day, $cat, $p, $name, $month, $posts;
    102102
    103103    // If there's a category
     
    129129
    130130    // If there's a post
    131     if ($single) {
     131    if (is_single()) {
    132132        $title = strip_tags($posts[0]->post_title);
    133133        $title = apply_filters('single_post_title', $title);
  • trunk/wp-trackback.php

    r1376 r1491  
    1616}
    1717
    18 if ( (($p != '') && ($p != 'all')) || ($name != '') ) {
     18if (is_single()) {
    1919    $tb_id = $posts[0]->ID;
    2020}
Note: See TracChangeset for help on using the changeset viewer.