wip
This commit is contained in:
@@ -138,6 +138,7 @@ function get_comment_to_edit( $id ) {
|
||||
* Gets the number of pending comments on a post or posts.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @since 6.9.0 Exclude the 'note' comment type from the count.
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
@@ -157,7 +158,7 @@ function get_pending_comments_num( $post_id ) {
|
||||
$post_id_array = array_map( 'intval', $post_id_array );
|
||||
$post_id_in = "'" . implode( "', '", $post_id_array ) . "'";
|
||||
|
||||
$pending = $wpdb->get_results( "SELECT comment_post_ID, COUNT(comment_ID) as num_comments FROM $wpdb->comments WHERE comment_post_ID IN ( $post_id_in ) AND comment_approved = '0' GROUP BY comment_post_ID", ARRAY_A );
|
||||
$pending = $wpdb->get_results( "SELECT comment_post_ID, COUNT(comment_ID) as num_comments FROM $wpdb->comments WHERE comment_post_ID IN ( $post_id_in ) AND comment_approved = '0' AND comment_type != 'note' GROUP BY comment_post_ID", ARRAY_A );
|
||||
|
||||
if ( $single ) {
|
||||
if ( empty( $pending ) ) {
|
||||
@@ -210,6 +211,8 @@ function enqueue_comment_hotkeys_js() {
|
||||
/**
|
||||
* Displays error message at bottom of comments.
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param string $msg Error Message. Assumed to contain HTML and be sanitized.
|
||||
*/
|
||||
function comment_footer_die( $msg ) {
|
||||
|
||||
Reference in New Issue
Block a user