wp/wp-includes/class-wp-customize-setting.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-includes/class-wp-customize-setting.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-includes/class-wp-customize-setting.php	Tue Sep 27 16:37:53 2022 +0200
@@ -268,7 +268,7 @@
 	 * @since 4.5.0
 	 * @ignore
 	 */
-	static public function reset_aggregated_multidimensionals() {
+	public static function reset_aggregated_multidimensionals() {
 		self::$aggregated_multidimensionals = array();
 	}
 
@@ -394,7 +394,7 @@
 				 *
 				 * @since 3.4.0
 				 *
-				 * @param WP_Customize_Setting $this WP_Customize_Setting instance.
+				 * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
 				 */
 				do_action( "customize_preview_{$this->id}", $this );
 
@@ -406,7 +406,7 @@
 				 *
 				 * @since 4.1.0
 				 *
-				 * @param WP_Customize_Setting $this WP_Customize_Setting instance.
+				 * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
 				 */
 				do_action( "customize_preview_{$this->type}", $this );
 		}
@@ -533,7 +533,7 @@
 		 *
 		 * @since 3.4.0
 		 *
-		 * @param WP_Customize_Setting $this WP_Customize_Setting instance.
+		 * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
 		 */
 		do_action( "customize_save_{$id_base}", $this );
 
@@ -547,11 +547,11 @@
 	 *
 	 * @since 3.4.0
 	 *
-	 * @param mixed $default A default value which is used as a fallback. Default null.
+	 * @param mixed $default_value A default value which is used as a fallback. Default null.
 	 * @return mixed The default value on failure, otherwise the sanitized and validated value.
 	 */
-	final public function post_value( $default = null ) {
-		return $this->manager->post_value( $this, $default );
+	final public function post_value( $default_value = null ) {
+		return $this->manager->post_value( $this, $default_value );
 	}
 
 	/**
@@ -559,7 +559,7 @@
 	 *
 	 * @since 3.4.0
 	 *
-	 * @param string|array $value    The value to sanitize.
+	 * @param string|array $value The value to sanitize.
 	 * @return string|array|null|WP_Error Sanitized value, or `null`/`WP_Error` if invalid.
 	 */
 	public function sanitize( $value ) {
@@ -569,8 +569,8 @@
 		 *
 		 * @since 3.4.0
 		 *
-		 * @param mixed                $value Value of the setting.
-		 * @param WP_Customize_Setting $this  WP_Customize_Setting instance.
+		 * @param mixed                $value   Value of the setting.
+		 * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
 		 */
 		return apply_filters( "customize_sanitize_{$this->id}", $value, $this );
 	}
@@ -621,22 +621,22 @@
 	 *
 	 * @since 4.4.0
 	 *
-	 * @param mixed $default Value to return if root does not exist.
+	 * @param mixed $default_value Value to return if root does not exist.
 	 * @return mixed
 	 */
-	protected function get_root_value( $default = null ) {
+	protected function get_root_value( $default_value = null ) {
 		$id_base = $this->id_data['base'];
 		if ( 'option' === $this->type ) {
-			return get_option( $id_base, $default );
+			return get_option( $id_base, $default_value );
 		} elseif ( 'theme_mod' === $this->type ) {
-			return get_theme_mod( $id_base, $default );
+			return get_theme_mod( $id_base, $default_value );
 		} else {
 			/*
 			 * Any WP_Customize_Setting subclass implementing aggregate multidimensional
 			 * will need to override this method to obtain the data from the appropriate
 			 * location.
 			 */
-			return $default;
+			return $default_value;
 		}
 	}
 
@@ -697,8 +697,8 @@
 			 *
 			 * @since 3.4.0
 			 *
-			 * @param mixed                $value Value of the setting.
-			 * @param WP_Customize_Setting $this  WP_Customize_Setting instance.
+			 * @param mixed                $value   Value of the setting.
+			 * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
 			 */
 			do_action( "customize_update_{$this->type}", $value, $this );
 
@@ -761,8 +761,8 @@
 			 * @since 3.4.0
 			 * @since 4.6.0 Added the `$this` setting instance as the second parameter.
 			 *
-			 * @param mixed                $default The setting default value. Default empty.
-			 * @param WP_Customize_Setting $setting The setting instance.
+			 * @param mixed                $default_value The setting default value. Default empty.
+			 * @param WP_Customize_Setting $setting       The setting instance.
 			 */
 			$value = apply_filters( "customize_value_{$id_base}", $value, $this );
 		} elseif ( $this->is_multidimensional_aggregated ) {
@@ -930,16 +930,16 @@
 	 *
 	 * @param array $root
 	 * @param array $keys
-	 * @param mixed $default A default value which is used as a fallback. Default null.
+	 * @param mixed $default_value A default value which is used as a fallback. Default null.
 	 * @return mixed The requested value or the default value.
 	 */
-	final protected function multidimensional_get( $root, $keys, $default = null ) {
+	final protected function multidimensional_get( $root, $keys, $default_value = null ) {
 		if ( empty( $keys ) ) { // If there are no keys, test the root.
-			return isset( $root ) ? $root : $default;
+			return isset( $root ) ? $root : $default_value;
 		}
 
 		$result = $this->multidimensional( $root, $keys );
-		return isset( $result ) ? $result['node'][ $result['key'] ] : $default;
+		return isset( $result ) ? $result['node'][ $result['key'] ] : $default_value;
 	}
 
 	/**