Skip to content

Commit 0daf1ff

Browse files
committed
fix ListWall
1 parent 6059559 commit 0daf1ff

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

functions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage Adams
77
*/
88
if (!defined('THEME_NAME')) define('THEME_NAME', 'Adams');
9-
if (!defined('THEME_DB_VERSION')) define('THEME_DB_VERSION', 'v1.5.2');
9+
if (!defined('THEME_DB_VERSION')) define('THEME_DB_VERSION', 'v1.5.3');
1010
if (version_compare($GLOBALS['wp_version'], '4.4-alpha', '<')) {
1111
wp_die('Please upgrade to version 4.4 or higher');
1212
}

list-wall.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<article class="post_article readerswall" itemscope itemtype="https://schema.org/Article">
88
<ul>
99
<?php
10-
$query = "SELECT COUNT(comment_ID) AS cnt, comment_author, comment_author_url, comment_author_email FROM (SELECT * FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->posts.ID=$wpdb->comments.comment_post_ID) WHERE comment_date > date_sub( NOW(), INTERVAL 2 MONTH ) AND user_id='0' AND post_password='' AND comment_approved='1' AND comment_type='') AS tempcmt GROUP BY comment_author_email ORDER BY cnt DESC LIMIT 24";
10+
$query = "SELECT COUNT(comment_ID) AS cnt, comment_author, comment_author_url, comment_author_email FROM (SELECT * FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->posts.ID=$wpdb->comments.comment_post_ID) WHERE comment_date > date_sub( NOW(), INTERVAL 3 MONTH ) AND user_id='0' AND post_password='' AND comment_approved='1' AND comment_type='comment') AS tempcmt GROUP BY comment_author_email ORDER BY cnt DESC LIMIT 12";
1111
foreach ($wpdb->get_results($query) as $comment) { ?>
1212
<li>
13-
<a href="<?= ($comment->comment_author_url ?: 'javascript:void(0);') ?>" target="_blank"
13+
<a href="<?= ($comment->comment_author_url ?: 'javascript:void(0);') ?>" target="<?= ($comment->comment_author_url ? '_blank' : '_self') ?>"
1414
title="<?= $comment->comment_author ?><?= $comment->cnt ?>)">
1515
<?= get_avatar($comment->comment_author_email, 160); ?>
1616
<span><?= $comment->comment_author ?><br></span>

style.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Description: Simple is beautiful
66
Author: Tokin
77
Author URI: https://biji.io
8-
Version: 1.5.2
8+
Version: 1.5.3
99
*/
1010
/* Reset */
1111
html { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }

0 commit comments

Comments
 (0)