summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wp-admin/includes/class-wp-list-table.php4
-rw-r--r--src/wp-includes/class-wp-comment-query.php4
-rw-r--r--src/wp-includes/post.php9
3 files changed, 12 insertions, 5 deletions
diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index 5a7fa0db8e..cdf31db597 100644
--- a/src/wp-admin/includes/class-wp-list-table.php
+++ b/src/wp-admin/includes/class-wp-list-table.php
@@ -72,10 +72,10 @@ class WP_List_Table {
protected $modes = array();
/**
- * Stores the value returned by ->get_column_info().
+ * Stores the value returned by ::get_column_info().
*
* @since 4.1.0
- * @var array
+ * @var array|null
*/
protected $_column_headers;
diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php
index 6a72c0d209..03d3479b6c 100644
--- a/src/wp-includes/class-wp-comment-query.php
+++ b/src/wp-includes/class-wp-comment-query.php
@@ -579,9 +579,7 @@ class WP_Comment_Query {
}
}
- if ( ! empty( $status_clauses ) ) {
- $approved_clauses[] = '( ' . implode( ' OR ', $status_clauses ) . ' )';
- }
+ $approved_clauses[] = '( ' . implode( ' OR ', $status_clauses ) . ' )';
}
// User IDs or emails whose unapproved comments are included, regardless of $status.
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index bd749b2f82..ae711eebb8 100644
--- a/src/wp-includes/post.php
+++ b/src/wp-includes/post.php
@@ -4874,6 +4874,15 @@ function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true )
}
}
+ /**
+ * Fires immediately before a new post is inserted in the database.
+ *
+ * @since 6.9.0
+ *
+ * @param array $data Array of unslashed post data.
+ */
+ do_action( 'pre_post_insert', $data );
+
if ( false === $wpdb->insert( $wpdb->posts, $data ) ) {
if ( $wp_error ) {
if ( 'attachment' === $post_type ) {