From 1497c955790eaa3eaa905146e0a63f0f287823eb Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Thu, 18 Jul 2019 08:09:50 +0200
Subject: [PATCH] Use spread operator in map_meta_cap() [2]
---
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 e2d132d217..7965ed8e8d 100644
|
a
|
b
|
function map_meta_cap( $cap, $user_id, ...$args ) { |
| 582 | 582 | // Handle meta capabilities for custom post types. |
| 583 | 583 | global $post_type_meta_caps; |
| 584 | 584 | if ( isset( $post_type_meta_caps[ $cap ] ) ) { |
| 585 | | $args = array_merge( array( $post_type_meta_caps[ $cap ], $user_id ), $args ); |
| 586 | | return call_user_func_array( 'map_meta_cap', $args ); |
| | 585 | return map_meta_cap( $post_type_meta_caps[ $cap ], $user_id, ...$args ); |
| 587 | 586 | } |
| 588 | 587 | |
| 589 | 588 | // Block capabilities map to their post equivalent. |