mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Allow comments on pages. Props: error http://wordpress.org/support/6/16759
git-svn-id: http://svn.automattic.com/wordpress/trunk@1860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1408432e64
commit
013f6d6fee
@ -25,7 +25,7 @@ add_filter('comment_save_pre', 'balanceTags', 50);
|
||||
function comments_template() {
|
||||
global $withcomments, $post, $wpdb, $id, $comment;
|
||||
|
||||
if ( is_single() || $withcomments ) :
|
||||
if ( is_single() || is_page() || $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])) : '';
|
||||
@ -100,7 +100,7 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
|
||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||
global $comment_count_cache;
|
||||
|
||||
if (! is_single()) {
|
||||
if (! is_single() && ! is_page()) {
|
||||
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 {
|
||||
|
@ -50,7 +50,7 @@ function get_permalink($id = false) {
|
||||
}
|
||||
|
||||
if ($idpost->post_status == 'static') {
|
||||
return get_page_link();
|
||||
return get_page_link($idpost->ID);
|
||||
}
|
||||
|
||||
$permalink = get_settings('permalink_structure');
|
||||
|
Loading…
x
Reference in New Issue
Block a user