WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/15/2019 11:53:01 AM (3 months 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-includes/class-wp-query.php

    r45932 r46144  
    35623562    public function __call( $name, $arguments ) {
    35633563        if ( in_array( $name, $this->compat_methods ) ) {
    3564             return call_user_func_array( array( $this, $name ), $arguments );
     3564            return $this->$name( ...$arguments );
    35653565        }
    35663566        return false;
Note: See TracChangeset for help on using the changeset viewer.