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
This commit is contained in:
Sergey Biryukov 2019-09-15 11:22:51 +00:00
parent 49de2b7312
commit 416e3d6c10

View File

@ -579,8 +579,7 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
// Handle meta capabilities for custom post types. // Handle meta capabilities for custom post types.
global $post_type_meta_caps; global $post_type_meta_caps;
if ( isset( $post_type_meta_caps[ $cap ] ) ) { if ( isset( $post_type_meta_caps[ $cap ] ) ) {
$args = array_merge( array( $post_type_meta_caps[ $cap ], $user_id ), $args ); return map_meta_cap( $post_type_meta_caps[ $cap ], $user_id, ...$args );
return call_user_func_array( 'map_meta_cap', $args );
} }
// Block capabilities map to their post equivalent. // Block capabilities map to their post equivalent.