Make WordPress Core


Ignore:
Timestamp:
09/15/2019 11:26:16 AM (7 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-setting.php

    r45232 r46133  
    816816         */
    817817        final public function check_capabilities() {
    818                 if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) {
     818                if ( $this->capability && ! current_user_can( $this->capability ) ) {
    819819                        return false;
    820820                }
    821821
    822                 if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) {
     822                if ( $this->theme_supports && ! current_theme_supports( ... (array) $this->theme_supports ) ) {
    823823                        return false;
    824824                }
Note: See TracChangeset for help on using the changeset viewer.