WP_Customize_Nav_Menus::filter_nonces() WordPress Method
The WP_Customize_Nav_Menus::filter_nonces() method is used to filter the nonces for the customizer settings pages. This is necessary because the customizer settings pages use ajax to save settings, and the nonces need to be updated to match the new setting values.
WP_Customize_Nav_Menus::filter_nonces( string[] $nonces ) #
Adds a nonce for customizing menus.
Parameters
- $nonces
(string[])(Required)Array of nonces.
Return
(string[]) Modified array of nonces.
Source
File: wp-includes/class-wp-customize-nav-menus.php
public function filter_nonces( $nonces ) { $nonces['customize-menus'] = wp_create_nonce( 'customize-menus' ); return $nonces; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |