From 416e3d6c1048da486eee9aeb99f74a192bb4b1f6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 15 Sep 2019 11:22:51 +0000 Subject: [PATCH] Code Modernisation: Replace `call_user_func_array()` in `wp-includes/capabilities.php` with a direct function call. Props jrf. See #47678. git-svn-id: https://develop.svn.wordpress.org/trunk@46132 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/capabilities.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-includes/capabilities.php b/src/wp-includes/capabilities.php index 1330e61a0b..e3a18f6b28 100644 --- a/src/wp-includes/capabilities.php +++ b/src/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.