Changeset 2009
- Timestamp:
- 12/30/2004 10:58:06 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 6 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r1668 r2009 2 2 /* Don't remove this line. */ 3 3 require('./wp-blog-header.php'); 4 include(ABSPATH . '/wp-header.php');4 get_header(); 5 5 ?> 6 6 … … 28 28 </div> 29 29 30 <?php comments_template( ); // Get wp-comments.php template ?>30 <?php comments_template( is_single() ); // Get wp-comments.php template ?> 31 31 32 32 <?php endwhile; else: ?> … … 36 36 <?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?> 37 37 38 <?php include(ABSPATH . '/wp-footer.php'); ?>38 <?php get_footer(); ?> -
trunk/wp-admin/upgrade-schema.php
r1997 r2009 211 211 add_option('template', 'default'); 212 212 add_option('stylesheet', 'default'); 213 add_option('comment_whitelist', 0);213 add_option('comment_whitelist', 1); 214 214 add_option('page_uris'); 215 215 -
trunk/wp-includes/classes.php
r2007 r2009 66 66 if ('' != $qv['name']) { 67 67 $this->is_single = true; 68 } else if (($qv['p'] != '') && ($qv['p'] != 'all') && (intval($q['p']) != 0)) {68 } elseif ( intval( $q['p'] ) != 0 && $qv['p'] != 'all' ) { 69 69 $this->is_single = true; 70 } elseif (('' != $qv['hour']) && ('' != $qv['minute']) &&('' != $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day'])) {70 } elseif (('' != $qv['hour']) && ('' != $qv['minute']) &&('' != $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day'])) { 71 71 // If year, month, day, hour, minute, and second are set, a single 72 72 // post is being queried. 73 73 $this->is_single = true; 74 } else 74 } elseif ('' != $qv['static'] || '' != $qv['pagename'] || '' != $qv['page_id']) { 75 75 $this->is_page = true; 76 76 $this->is_single = false; 77 } else 77 } elseif (!empty($qv['s'])) { 78 78 $this->is_search = true; 79 79 } else { -
trunk/wp-includes/comment-functions.php
r1992 r2009 3 3 // Template functions 4 4 5 function comments_template( ) {6 global $w ithcomments, $post, $wpdb, $id, $comment;5 function comments_template( $show ) { 6 global $wp_query, $withcomments, $post, $wpdb, $id, $comment; 7 7 8 8 if ( is_single() || is_page() || $withcomments ) : … … 13 13 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"); 14 14 15 $template = get_template_directory(); 16 $template .= "/comments.php"; 17 18 if (file_exists($template)) { 19 include($template); 20 } else { 21 include(ABSPATH . 'wp-comments.php'); 22 } 15 if ( file_exists( TEMPLATEPATH . '/comments.php') ) 16 require( TEMPLATEPATH . '/comments.php'); 17 else 18 require( ABSPATH . 'wp-includes/wp-comments.php'); 23 19 24 20 endif; … … 73 69 74 70 if (empty ($file)) { 75 $template = TEMPLATEPATH . '/comments-popup.php'; 76 if (file_exists($template)) { 77 $wpcommentspopupfile = str_replace(ABSPATH, '', $template); 78 } else { 79 $wpcommentspopupfile = 'wp-comments-popup.php'; 80 } 71 if ( file_exists( TEMPLATEPATH . '/comments-popup.php') ) 72 require( TEMPLATEPATH . '/comments-popup.php'); 73 else 74 require( ABSPATH . 'wp-includes/wp-comments-popup.php'); 81 75 } else { 82 76 $wpcommentspopupfile = $file; -
trunk/wp-includes/functions.php
r1991 r2009 1059 1059 global $wp_query; 1060 1060 1061 if ( ! $wp_query->is_single) {1061 if ( !$wp_query->is_single ) 1062 1062 return false; 1063 } 1064 1065 if (empty($post)) { 1066 return true; 1067 } 1063 1064 if ( empty( $post) ) 1065 return true; 1068 1066 1069 1067 $post_obj = $wp_query->get_queried_object(); 1070 1068 1071 if ($post == $post_obj->ID) { 1072 return true; 1073 } else if ($post == $post_obj->post_title) { 1074 return true; 1075 } else if ($post == $post_obj->post_name) { 1076 return true; 1077 } 1069 if ( $post == $post_obj->ID ) 1070 return true; 1071 elseif ( $post == $post_obj->post_title ) 1072 return true; 1073 elseif ( $post == $post_obj->post_name ) 1074 return true; 1078 1075 1079 1076 return false; -
trunk/wp-includes/template-functions-general.php
r1997 r2009 2 2 3 3 /* Note: these tags go anywhere in the template */ 4 5 function get_header() { 6 global $wpdb, $wp_query; 7 if ( file_exists( TEMPLATEPATH . '/header.php') ) 8 require_once( TEMPLATEPATH . '/header.php'); 9 else 10 require_once( ABSPATH . 'wp-includes/wp-header.php'); 11 } 12 13 function get_footer() { 14 global $wpdb, $wp_query; 15 if ( file_exists( TEMPLATEPATH . '/footer.php') ) 16 require_once( TEMPLATEPATH . '/footer.php'); 17 else 18 require_once( ABSPATH . 'wp-includes/wp-footer.php'); 19 } 20 21 function get_sidebar() { 22 global $wpdb, $wp_query; 23 if ( file_exists( TEMPLATEPATH . '/sidebar.php') ) 24 require_once( TEMPLATEPATH . '/sidebar.php'); 25 else 26 require_once( ABSPATH . 'wp-includes/wp-sidebar.php'); 27 } 28 4 29 5 30 function wp_loginout() { … … 85 110 $output = get_stylesheet(); 86 111 if (empty($output) || $output == 'default') { 87 $output = get_settings('siteurl') . "/wp- layout.css";112 $output = get_settings('siteurl') . "/wp-includes/wp-layout.css"; 88 113 } else { 89 114 $output = get_settings('siteurl') . "/wp-content/themes/$output/style.css";
Note: See TracChangeset
for help on using the changeset viewer.