- Timestamp:
- 03/01/2021 06:53:45 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-core-members-template.php
r12693 r12852 124 124 * } 125 125 */ 126 public function __construct( $args ) {126 public function __construct( ...$args ) { 127 127 // Backward compatibility with old method of passing arguments. 128 if ( ! is_array( $args ) || func_num_args() > 1 ) {128 if ( ! is_array( $args[0] ) || count( $args ) > 1 ) { 129 129 _deprecated_argument( __METHOD__, '7.0.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) ); 130 130 … … 147 147 ); 148 148 149 $args = bp_core_parse_args_array( $old_args_keys, func_get_args() ); 149 $args = bp_core_parse_args_array( $old_args_keys, $args ); 150 } else { 151 $args = reset( $args ); 150 152 } 151 153
Note: See TracChangeset
for help on using the changeset viewer.