diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wp-admin/includes/class-wp-list-table.php | 4 | ||||
-rw-r--r-- | src/wp-includes/class-wp-comment-query.php | 4 | ||||
-rw-r--r-- | src/wp-includes/class-wp-customize-widgets.php | 2 | ||||
-rw-r--r-- | src/wp-includes/post.php | 9 |
4 files changed, 13 insertions, 6 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/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php index 2a7915224b..b24a9c8b47 100644 --- a/src/wp-includes/class-wp-customize-widgets.php +++ b/src/wp-includes/class-wp-customize-widgets.php @@ -923,7 +923,7 @@ final class WP_Customize_Widgets { <span class="customize-action"> <?php $panel = $this->manager->get_panel( 'widgets' ); - $panel_title = $panel && isset( $panel->title ) ? $panel->title : __( 'Widgets' ); + $panel_title = isset( $panel->title ) ? $panel->title : __( 'Widgets' ); /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ printf( __( 'Customizing ▸ %s' ), esc_html( $panel_title ) ); ?> 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 ) { |