W3cubDocs

/WordPress

WP_Customize_Setting::save()

Checks user capabilities and theme supports, and then saves the value of the setting.

Return

(void|false) False if cap check fails or value isn't set or is invalid.

Source

File: wp-includes/class-wp-customize-setting.php

final public function save() {
		$value = $this->post_value();

		if ( ! $this->check_capabilities() || ! isset( $value ) ) {
			return false;
		}

		$id_base = $this->id_data['base'];

		/**
		 * Fires when the WP_Customize_Setting::save() method is called.
		 *
		 * The dynamic portion of the hook name, `$id_base` refers to
		 * the base slug of the setting name.
		 *
		 * @since 3.4.0
		 *
		 * @param WP_Customize_Setting $this WP_Customize_Setting instance.
		 */
		do_action( "customize_save_{$id_base}", $this );

		$this->update( $value );
	}

Changelog

Version Description
3.4.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_setting/save