WP_Customize_Manager::refresh_nonces() WordPress Method

The WP_Customize_Manager::refresh_nonces() method refreshes the nonces for the Customizer. This is useful for ensuring that the Customizer nonces are up-to-date when making Ajax requests.

WP_Customize_Manager::refresh_nonces() #

Refreshes nonces for the current preview.


Source

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

	public function refresh_nonces() {
		if ( ! $this->is_preview() ) {
			wp_send_json_error( 'not_preview' );
		}

		wp_send_json_success( $this->get_nonces() );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More