You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wpdb-status.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -109,11 +109,11 @@ public function __construct() {
109
109
echo'</h2>';
110
110
111
111
echo'Empty Post Title:';
112
-
echo'<pre><code>SELECT ID FROM ' . DB_PREFIX . 'posts WHERE post_title=\'\' AND post_status!=\'auto-draft\' AND (post_type=\'post\' OR post_type=\'page\');</code></pre>';
113
-
echo'<pre><code>DELETE FROM ' . DB_PREFIX . 'posts WHERE post_title=\'\' AND post_status!=\'auto-draft\' AND (post_type=\'post\' OR post_type=\'page\')</code></pre>';
112
+
echo'<pre><code>SELECT ID FROM ' . DB_PREFIX . 'posts WHERE post_title=\'\' AND post_status!='draft' AND post_status!='trash'AND post_status!=\'auto-draft\' AND (post_type=\'post\' OR post_type=\'page\');</code></pre>';
113
+
echo'<pre><code>DELETE FROM ' . DB_PREFIX . 'posts WHERE post_title=\'\' AND post_status!='draft' AND post_status!='trash'AND post_status!=\'auto-draft\' AND (post_type=\'post\' OR post_type=\'page\')</code></pre>';
114
114
115
115
echo'<h2>WP Post without content: ';
116
-
$posts = $this->db_query( "SELECT ID FROM " . DB_PREFIX . "posts WHERE post_content='' AND post_status!='auto-draft' AND (post_type='post' OR post_type='page')" );
116
+
$posts = $this->db_query( "SELECT ID FROM " . DB_PREFIX . "posts WHERE post_content='' AND post_status!='draft' AND post_status!='trash' AND post_status!='auto-draft' AND (post_type='post' OR post_type='page')" );
0 commit comments