customize_refresh_nonces
Filters nonces for Customizer.
Description
Parameters (2)
- 0. $nonces (array)
- Array of refreshed nonces for save and preview actions.
- 1. $instance (WP_Customize_Manager)
-
WP_Customize_Manager
instance.
Usage
- To run the hook, copy the example below.
- $nonces = apply_filters( 'customize_refresh_nonces', $nonces, $instance );
- if ( !empty( $nonces ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the customize_refresh_nonces callback
- function filter_customize_refresh_nonces( $nonces, $instance ) {
- // make filter magic happen here...
- return $nonces;
- };
- // add the filter
- add_filter( 'customize_refresh_nonces', 'filter_customize_refresh_nonces', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'customize_refresh_nonces', 'filter_customize_refresh_nonces', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/class-wp-customize-manager.php
- $nonces = apply_filters( 'customize_refresh_nonces', $nonces, $this );