
內容簡介
注意:此外掛自 WordPress 4.3 版本開始已被棄用,因為 WordPress 現在已經能夠以比此外掛更美觀的方式顯示待審核評論的數量,所以如果您使用的是 WP 4.3 或更新版本,就不需要使用此外掛了。實際上,如果您嘗試使用它,它將對您沒有任何作用。該外掛在 WP 4.2 及更早版本中仍然完全可用。
預設情況下,在文章的管理清單中,每篇文章都會在一個氣泡中顯示其已核准評論的數量。如果您將滑鼠懸停在評論數量上,工具提示懸停文字會顯示待審核評論的數量。此外掛利用 JavaScript 更改文章清單,以便在同一個評論氣泡內(儘管以分隔符區分)顯示待審核評論數量和已核准評論數量。
待審核評論數將顯示為以下文章評論數量中:
文章列表(曾經稱為“編輯文章”)
頁面列表(曾經稱為“編輯頁面”)
評論列表(曾經稱為“編輯評論”)
此外掛僅適用於開啟 JavaScript 且在管理員中的用戶。
連結: 外掛主頁 | 外掛目錄頁 | 作者主頁
篩選功能
此外掛可透過兩個篩選器進一步自訂。通常,這些自訂將放置到您的活躍佈景主題的 functions.php 文件中,或被其他外掛使用。
c2c_show_pending_comments_count_column_width
“c2c_show_pending_comments_count_column_width” 篩選器允許您自訂顯示待審核評論時評論欄位使用的列寬。 WP 的默認值為“4em”,這不足以顯示可能的 3 位數的已批准評論,以及可能的 2 位數的待審核評論。此外掛定義的默認值是“5em”,大多數情況下足夠處理。如果您想更改寬度,請使用此過濾器。
引數:
$comment_column_width (string):評論欄位的寬度。默認值為“5em”。請按 CSS 認識的寬度進行表達。
例子:
<?php
//讓它更寬
function my_c2c_show_pending_comments_count_column_width( $comment_column_width ) {
return '6em';
}
add_filter( 'c2c_show_pending_comments_count_column_width', 'my_c2c_show_pending_comments_count_column_width' );
?>
c2c_show_pending_comments_count_separator
“c2c_show_pending_comments_count_separator” 篩選器允許您指定用作已核准評論數量和待審核評論數量之間分隔符的字符。默認情況下,這是“•”(一個圓點,兩邊有空格)。
引數:
$separator (string):用作分隔符的字符或字符串。默認情況下,這是' • '(注意兩邊的空格)。
外掛標籤
開發者團隊
原文外掛簡介
NOTE: This plugin is deprecated as of WordPress 4.3, which now includes a display of the count of pending comments alongside the regular count of comments. And it does so in a more aesthetically pleasing fashion than this plugin ever did, so if you are using WP 4.3 or later, there’s no need to use this plugin. In fact, it won’t do anything for you if you try to use it. The plugin is still fully functional for WP 4.2 and earlier.
By default, in the admin listing of posts, each post has its count of approved comments displayed within a word bubble. If you hover over a comment count, the tooltip hover text indicates the number of pending comments. This plugin utilizes JavaScript to change the post listings so that the pending comments count is displayed next to the approved comments count inside the same word bubble (though with a separator).
The pending comments count will appear next to post comment counts in:
The “Posts” listing of posts (formerly called “Edit Posts”)
The “Pages” listing of pages (formerly called “Edit Pages”)
The “Comments” listing of comments (formerly called “Edit Comments”)
This plugin will only function for users in the admin who have JavaScript enabled.
Links: Plugin Homepage | Plugin Directory Page | Author Homepage
Filters
The plugin is further customizable via two filters. Typically, these customizations would be put into your active theme’s functions.php file, or used by another plugin.
c2c_show_pending_comments_count_column_width
The ‘c2c_show_pending_comments_count_column_width’ filter allows you to customize the column width used for the comment column when pending comments are also being displayed. The WP default is “4em”, which is not sufficient to display a possible 3 digits for approved comments in addition to a possible 2 digits in pending comments. The default defined by the plugin is “5em” which should handle most cases sufficiently. Use the filter if you want to change the width.
Arguments:
$comment_column_width (string): The width of the comment column. Default is “5em”. Express as a width measurement recognized by CSS.
Example:
c2c_show_pending_comments_count_separator
The ‘c2c_show_pending_comments_count_separator’ filter allows you to specify the character used as the separator between the count of approved comments and the count of pending comments. By default this is ‘ • ‘ (a bullet, with space on either side).
Arguments:
$separator (string): The character or string to be used as the separator. By default this is ‘ • ‘ (note space of either side).
