Skip to content

Commit 4b7c59a

Browse files
Update src/wp-includes/post.php
Co-authored-by: Weston Ruter <[email protected]>
1 parent 0f59639 commit 4b7c59a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/wp-includes/post.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,10 +2297,12 @@ function add_post_type_support( $post_type, $feature, ...$args ) {
22972297
foreach ( $features as $feature ) {
22982298
if ( $args ) {
22992299
// Check if feature already exists with args and if both are associative arrays that should be merged.
2300-
if ( isset( $_wp_post_type_features[ $post_type ][ $feature ][0] )
2301-
&& is_array( $_wp_post_type_features[ $post_type ][ $feature ][0] )
2302-
&& isset( $args[0] )
2303-
&& is_array( $args[0] ) ) {
2300+
if (
2301+
isset( $_wp_post_type_features[ $post_type ][ $feature ][0] ) &&
2302+
is_array( $_wp_post_type_features[ $post_type ][ $feature ][0] ) &&
2303+
isset( $args[0] ) &&
2304+
is_array( $args[0] )
2305+
) {
23042306
// Merge the associative arrays to preserve existing properties.
23052307
$_wp_post_type_features[ $post_type ][ $feature ][0] = array_merge(
23062308
$_wp_post_type_features[ $post_type ][ $feature ][0],

0 commit comments

Comments
 (0)