Changeset 55039
- Timestamp:
- 01/09/2023 04:38:34 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/manager.php
r54519 r55039 3352 3352 3353 3353 /** 3354 * Return 'Test_Dynamic_Customize_Setting' in 'customize_dynamic_setting_class.3355 * 3356 * @param string $ class Setting class.3357 * @param array $ args Setting args.3358 * @param string $ id Setting ID.3359 * @return string 3360 */ 3361 public function return_dynamic_customize_setting_class( $ class, $id, $args ) {3362 unset( $ args );3363 if ( 0 === strpos( $ id, 'dynamic' ) ) {3364 $ class = 'Test_Dynamic_Customize_Setting';3354 * Returns 'Test_Dynamic_Customize_Setting' in 'customize_dynamic_setting_class'. 3355 * 3356 * @param string $setting_class Setting class. 3357 * @param array $setting_args Setting args. 3358 * @param string $setting_id Setting ID. 3359 * @return string Setting class. 3360 */ 3361 public function return_dynamic_customize_setting_class( $setting_class, $setting_id, $setting_args ) { 3362 unset( $setting_args ); 3363 if ( 0 === strpos( $setting_id, 'dynamic' ) ) { 3364 $setting_class = 'Test_Dynamic_Customize_Setting'; 3365 3365 } 3366 return $ class;3367 } 3368 3369 /** 3370 * Return 'Test_Dynamic_Customize_Setting' in 'customize_dynamic_setting_class.3371 * 3372 * @param array $ args Setting args.3373 * @param string $ id Setting ID.3374 * @return stringSetting args.3375 */ 3376 public function return_dynamic_customize_setting_args( $ args, $id ) {3377 if ( 0 === strpos( $ id, 'dynamic' ) ) {3378 $ args['custom'] = 'foo';3366 return $setting_class; 3367 } 3368 3369 /** 3370 * Returns 'foo' in 'customize_dynamic_setting_args'. 3371 * 3372 * @param array $setting_args Setting args. 3373 * @param string $setting_id Setting ID. 3374 * @return array Setting args. 3375 */ 3376 public function return_dynamic_customize_setting_args( $setting_args, $setting_id ) { 3377 if ( 0 === strpos( $setting_id, 'dynamic' ) ) { 3378 $setting_args['custom'] = 'foo'; 3379 3379 } 3380 return $ args;3380 return $setting_args; 3381 3381 } 3382 3382
Note: See TracChangeset
for help on using the changeset viewer.