Make WordPress Core


Ignore:
Timestamp:
09/15/2019 11:26:16 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Code Modernisation: Replace call_user_func_array() in wp-includes/class-wp-customize-*.php with direct function calls in combination with the spread operator.

Props jrf.
See #47678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-panel.php

    r45932 r46133  
    225225     */
    226226    final public function check_capabilities() {
    227         if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) {
     227        if ( $this->capability && ! current_user_can( $this->capability ) ) {
    228228            return false;
    229229        }
    230230
    231         if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) {
     231        if ( $this->theme_supports && ! current_theme_supports( ... (array) $this->theme_supports ) ) {
    232232            return false;
    233233        }
Note: See TracChangeset for help on using the changeset viewer.