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() );
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.2.0 | Introduced. |