customize_refresh_nonces
Filters nonces for Customizer.
Usage
add_filter( 'customize_refresh_nonces', 'wp_kama_customize_refresh_nonces_filter', 10, 2 ); /** * Function for `customize_refresh_nonces` filter-hook. * * @param string[] $nonces Array of refreshed nonces for save and preview actions. * @param WP_Customize_Manager $manager WP_Customize_Manager instance. * * @return string[] */ function wp_kama_customize_refresh_nonces_filter( $nonces, $manager ){ // filter... return $nonces; }
- $nonces(string[])
- Array of refreshed nonces for save and preview actions.
- $manager(WP_Customize_Manager)
- WP_Customize_Manager instance.
Changelog
Since 4.2.0 | Introduced. |
Where the hook is called
customize_refresh_nonces
wp-includes/class-wp-customize-manager.php 4807
$nonces = apply_filters( 'customize_refresh_nonces', $nonces, $this );
Where the hook is used in WordPress
wp-includes/class-wp-customize-nav-menus.php 60
add_filter( 'customize_refresh_nonces', array( $this, 'filter_nonces' ) );
wp-includes/class-wp-customize-widgets.php 121
add_filter( 'customize_refresh_nonces', array( $this, 'refresh_nonces' ) );