WordPress.org

Make WordPress Core


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

    r45932 r46133  
    243243     */
    244244    final public function check_capabilities() {
    245         if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) {
     245        if ( $this->capability && ! current_user_can( $this->capability ) ) {
    246246            return false;
    247247        }
    248248
    249         if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) {
     249        if ( $this->theme_supports && ! current_theme_supports( ... (array) $this->theme_supports ) ) {
    250250            return false;
    251251        }
Note: See TracChangeset for help on using the changeset viewer.