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

git-svn-id: https://develop.svn.wordpress.org/trunk@1491 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2004-07-28 02:43:54 +00:00
parent d605d2aa6f
commit fdaf705b04
6 changed files with 17 additions and 9 deletions
+5 -4
View File
@@ -17,9 +17,9 @@ add_filter('comment_text', 'convert_smilies', 20);
add_filter('comment_excerpt', 'convert_chars');
function comments_template() {
global $withcomments, $single, $post, $wpdb, $id, $comment, $cookiehash;
global $withcomments, $post, $wpdb, $id, $comment, $cookiehash;
if ( $single || $withcomments ) :
if ( is_single() || $withcomments ) :
$req = get_settings('require_name_email');
$comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_'.$cookiehash])) : '';
$comment_author_email = isset($_COOKIE['comment_author_email_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_email_'.$cookiehash])) : '';
@@ -71,8 +71,9 @@ function comments_popup_script($width=400, $height=400, $file='wp-comments-popup
function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $cookiehash;
global $querystring_start, $querystring_equal, $querystring_separator;
global $comment_count_cache, $single;
if (!$single) {
global $comment_count_cache;
if (! is_single()) {
if ('' == $comment_count_cache["$id"]) {
$number = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1';");
} else {