Changeset 13108 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 09/12/2021 08:43:39 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-functions.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r12932 r13108 231 231 * 'arg4' => false, 232 232 * ); 233 * $r = wp_parse_args( $args, $defaults ); // ...233 * $r = bp_parse_args( $args, $defaults ); // ... 234 234 * 235 235 * The first argument, $old_args_keys, is an array that matches the parameter positions (keys) to … … 254 254 $new_args = array(); 255 255 256 foreach ( $old_args_keys as $arg_num => $arg_key ) {257 if ( isset( $func_args[ $arg_num] ) ) {258 $new_args[ $arg_key] = $func_args[$arg_num];256 foreach ( $old_args_keys as $arg_num => $arg_key ) { 257 if ( isset( $func_args[ $arg_num ] ) ) { 258 $new_args[ $arg_key ] = $func_args[ $arg_num ]; 259 259 } 260 260 } … … 291 291 292 292 // Passively filter the args before the parse. 293 if ( ! empty( $filter_key ) ) {293 if ( ! empty( $filter_key ) ) { 294 294 295 295 /** … … 306 306 307 307 // Parse. 308 if ( is_array( $defaults ) && ! empty( $defaults ) ) {308 if ( is_array( $defaults ) && ! empty( $defaults ) ) { 309 309 $r = array_merge( $defaults, $r ); 310 310 } 311 311 312 312 // Aggressively filter the args after the parse. 313 if ( ! empty( $filter_key ) ) {313 if ( ! empty( $filter_key ) ) { 314 314 315 315 /** … … 1196 1196 function bp_core_time_diff( $args = array() ) { 1197 1197 $retval = null; 1198 $r = wp_parse_args(1198 $r = bp_parse_args( 1199 1199 $args, 1200 1200 array( … … 2843 2843 */ 2844 2844 function bp_core_get_suggestions( $args ) { 2845 $args = bp_parse_args( $args, array(), 'get_suggestions' ); 2845 $args = bp_parse_args( 2846 $args, 2847 array(), 2848 'get_suggestions' 2849 ); 2846 2850 2847 2851 if ( ! $args['type'] ) { … … 3532 3536 } 3533 3537 3534 $args = bp_parse_args( $args, array( 3535 'tokens' => array(), 3536 ), 'send_email' ); 3537 3538 $args = bp_parse_args( 3539 $args, 3540 array( 3541 'tokens' => array(), 3542 ), 3543 'send_email' 3544 ); 3538 3545 3539 3546 /* 3540 3547 * Build the email. 3541 3548 */ 3542 3543 3549 $email = bp_get_email( $email_type ); 3544 3550 if ( is_wp_error( $email ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)