WordPress.org

Make WordPress Core

Changeset 46132


Ignore:
Timestamp:
09/15/2019 11:22:51 AM (3 months ago)
Author:
SergeyBiryukov
Message:

Code Modernisation: Replace call_user_func_array() in wp-includes/capabilities.php with a direct function call.

Props jrf.
See #47678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/capabilities.php

    r45932 r46132  
    580580            global $post_type_meta_caps;
    581581            if ( isset( $post_type_meta_caps[ $cap ] ) ) {
    582                 $args = array_merge( array( $post_type_meta_caps[ $cap ], $user_id ), $args );
    583                 return call_user_func_array( 'map_meta_cap', $args );
     582                return map_meta_cap( $post_type_meta_caps[ $cap ], $user_id, ...$args );
    584583            }
    585584
Note: See TracChangeset for help on using the changeset viewer.