Changeset 53246
- Timestamp:
- 04/24/2022 12:26:03 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-setting.php
r51919 r53246 548 548 * @since 3.4.0 549 549 * 550 * @param mixed $default A default value which is used as a fallback. Default null.550 * @param mixed $default_value A default value which is used as a fallback. Default null. 551 551 * @return mixed The default value on failure, otherwise the sanitized and validated value. 552 552 */ 553 final public function post_value( $default = null ) {554 return $this->manager->post_value( $this, $default );553 final public function post_value( $default_value = null ) { 554 return $this->manager->post_value( $this, $default_value ); 555 555 } 556 556 … … 622 622 * @since 4.4.0 623 623 * 624 * @param mixed $default Value to return if root does not exist.624 * @param mixed $default_value Value to return if root does not exist. 625 625 * @return mixed 626 626 */ 627 protected function get_root_value( $default = null ) {627 protected function get_root_value( $default_value = null ) { 628 628 $id_base = $this->id_data['base']; 629 629 if ( 'option' === $this->type ) { 630 return get_option( $id_base, $default );630 return get_option( $id_base, $default_value ); 631 631 } elseif ( 'theme_mod' === $this->type ) { 632 return get_theme_mod( $id_base, $default );632 return get_theme_mod( $id_base, $default_value ); 633 633 } else { 634 634 /* … … 637 637 * location. 638 638 */ 639 return $default ;639 return $default_value; 640 640 } 641 641 } … … 762 762 * @since 4.6.0 Added the `$this` setting instance as the second parameter. 763 763 * 764 * @param mixed $default The setting default value. Default empty.765 * @param WP_Customize_Setting $setting The setting instance.764 * @param mixed $default_value The setting default value. Default empty. 765 * @param WP_Customize_Setting $setting The setting instance. 766 766 */ 767 767 $value = apply_filters( "customize_value_{$id_base}", $value, $this ); … … 931 931 * @param array $root 932 932 * @param array $keys 933 * @param mixed $default A default value which is used as a fallback. Default null.933 * @param mixed $default_value A default value which is used as a fallback. Default null. 934 934 * @return mixed The requested value or the default value. 935 935 */ 936 final protected function multidimensional_get( $root, $keys, $default = null ) {936 final protected function multidimensional_get( $root, $keys, $default_value = null ) { 937 937 if ( empty( $keys ) ) { // If there are no keys, test the root. 938 return isset( $root ) ? $root : $default ;938 return isset( $root ) ? $root : $default_value; 939 939 } 940 940 941 941 $result = $this->multidimensional( $root, $keys ); 942 return isset( $result ) ? $result['node'][ $result['key'] ] : $default ;942 return isset( $result ) ? $result['node'][ $result['key'] ] : $default_value; 943 943 } 944 944
Note: See TracChangeset
for help on using the changeset viewer.