Changeset 56511
- Timestamp:
- 09/04/2023 11:38:37 AM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-hook.php
r55748 r56511 79 79 $this->callbacks[ $priority ][ $idx ] = array( 80 80 'function' => $callback, 81 'accepted_args' => $accepted_args,81 'accepted_args' => (int) $accepted_args, 82 82 ); 83 83 … … 305 305 306 306 // Avoid the array_slice() if possible. 307 if ( 0 == $the_['accepted_args'] ) {307 if ( 0 === $the_['accepted_args'] ) { 308 308 $value = call_user_func( $the_['function'] ); 309 309 } elseif ( $the_['accepted_args'] >= $num_args ) { 310 310 $value = call_user_func_array( $the_['function'], $args ); 311 311 } else { 312 $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );312 $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) ); 313 313 } 314 314 }
Note: See TracChangeset
for help on using the changeset viewer.