diff --git a/wp-includes/post.php b/wp-includes/post.php index 0f76da8cb1..209a8be645 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1779,15 +1779,15 @@ function _add_post_type_submenus() { * feature strings or a single string. * @param mixed ...$args Optional extra arguments to pass along with certain features. */ -function add_post_type_support( $post_type, $feature ) { +function add_post_type_support( $post_type, $feature, ...$args ) { global $_wp_post_type_features; $features = (array) $feature; foreach ( $features as $feature ) { - if ( func_num_args() == 2 ) { - $_wp_post_type_features[ $post_type ][ $feature ] = true; + if ( $args ) { + $_wp_post_type_features[ $post_type ][ $feature ] = $args; } else { - $_wp_post_type_features[ $post_type ][ $feature ] = array_slice( func_get_args(), 2 ); + $_wp_post_type_features[ $post_type ][ $feature ] = true; } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index e38ff952ad..c98948cc2f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45624'; +$wp_version = '5.3-alpha-45625'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.