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.


Top ↑

Return

(string[]) Modified array of nonces.


Top ↑

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;
	}


Top ↑

Changelog

Changelog
VersionDescription
4.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.