Changeset 55050 for trunk/tests/phpunit/tests/customize/setting.php
- Timestamp:
- 01/11/2023 12:21:41 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/setting.php
r54088 r55050 317 317 protected $custom_type_data_previewed; 318 318 319 private function custom_type_getter( $name, $default = null ) {319 private function custom_type_getter( $name, $default_value = null ) { 320 320 if ( did_action( "customize_preview_{$name}" ) && array_key_exists( $name, $this->custom_type_data_previewed ) ) { 321 321 $value = $this->custom_type_data_previewed[ $name ]; … … 323 323 $value = $this->custom_type_data_saved[ $name ]; 324 324 } else { 325 $value = $default ;325 $value = $default_value; 326 326 } 327 327 return $value; … … 335 335 * Filter for `customize_value_{$id_base}`. 336 336 * 337 * @param mixed $default 337 * @param mixed $default_value 338 338 * @param WP_Customize_Setting $setting 339 339 * 340 340 * @return mixed|null 341 341 */ 342 public function custom_type_value_filter( $default , $setting = null ) {342 public function custom_type_value_filter( $default_value, $setting = null ) { 343 343 $name = preg_replace( '/^customize_value_/', '', current_filter() ); 344 344 $this->assertInstanceOf( 'WP_Customize_Setting', $setting ); 345 345 $id_data = $setting->id_data(); 346 346 $this->assertSame( $name, $id_data['base'] ); 347 return $this->custom_type_getter( $name, $default );347 return $this->custom_type_getter( $name, $default_value ); 348 348 } 349 349
Note: See TracChangeset
for help on using the changeset viewer.