On this page
WP_Customize_Manager::refresh_nonces()
Refreshes nonces for the current preview.
Source
File: wp-includes/class-wp-customize-manager.php. View all references
public function refresh_nonces() {
if ( ! $this->is_preview() ) {
wp_send_json_error( 'not_preview' );
}
wp_send_json_success( $this->get_nonces() );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Customize_Manager::get_nonces() wp-includes/class-wp-customize-manager.php | Gets nonces for the Customizer. |
| WP_Customize_Manager::is_preview() wp-includes/class-wp-customize-manager.php | Determines whether it is a theme preview or not. |
| wp_send_json_error() wp-includes/functions.php | Sends a JSON response back to an Ajax request, indicating failure. |
| wp_send_json_success() wp-includes/functions.php | Sends a JSON response back to an Ajax request, indicating success. |
Changelog
| Version | Description |
|---|---|
| 4.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_manager/refresh_nonces