From d55f1f81c725ba6c20c50b9252f3625603a40367 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 15 Sep 2019 11:23:56 +0000 Subject: [PATCH] Code Modernisation: Replace `call_user_func_array()` in `wp-includes/capabilities.php` with a direct function call. Props jrf. See #47678. Built from https://develop.svn.wordpress.org/trunk@46132 git-svn-id: http://core.svn.wordpress.org/trunk@45944 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/capabilities.php | 3 +-- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 1330e61a0b..e3a18f6b28 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -579,8 +579,7 @@ function map_meta_cap( $cap, $user_id, ...$args ) { // Handle meta capabilities for custom post types. global $post_type_meta_caps; if ( isset( $post_type_meta_caps[ $cap ] ) ) { - $args = array_merge( array( $post_type_meta_caps[ $cap ], $user_id ), $args ); - return call_user_func_array( 'map_meta_cap', $args ); + return map_meta_cap( $post_type_meta_caps[ $cap ], $user_id, ...$args ); } // Block capabilities map to their post equivalent. diff --git a/wp-includes/version.php b/wp-includes/version.php index 4e613e3159..5fead86957 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46131'; +$wp_version = '5.3-alpha-46132'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.