Make WordPress Core


Ignore:
Timestamp:
09/15/2019 11:53:01 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Code Modernisation: Replace call_user_func_array() in various __call() methods with dynamic function calls.

The callback in these functions is always checked against a limited list of valid callbacks that can be safely changed to dynamic function calls.

Props jrf.
See #47678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r45932 r46144  
    240240    public function __call( $name, $arguments ) {
    241241        if ( in_array( $name, $this->compat_methods ) ) {
    242             return call_user_func_array( array( $this, $name ), $arguments );
     242            return $this->$name( ...$arguments );
    243243        }
    244244        return false;
Note: See TracChangeset for help on using the changeset viewer.