GC_Customize_Manager::get_nonces()
最后更新于:2021-11-27 00:58:11
GC_Customize_Manager::get_nonces()Get nonces for the Customizer.
响应
(array) Nonces.
源文件
文件: gc-includes/class-gc-customize-manager.php
public function get_nonces() {
$nonces = array(
'save' => gc_create_nonce( 'save-customize_' . $this->get_stylesheet() ),
'preview' => gc_create_nonce( 'preview-customize_' . $this->get_stylesheet() ),
'switch_themes' => gc_create_nonce( 'switch_themes' ),
'dismiss_autosave_or_lock' => gc_create_nonce( 'customize_dismiss_autosave_or_lock' ),
'override_lock' => gc_create_nonce( 'customize_override_changeset_lock' ),
'trash' => gc_create_nonce( 'trash_customize_changeset' ),
);
/**
* Filters nonces for Customizer.
*
* @since 4.2.0
*
* @param string[] $nonces Array of refreshed nonces for save and
* preview actions.
* @param GC_Customize_Manager $this GC_Customize_Manager instance.
*/
$nonces = apply_filters( 'customize_refresh_nonces', $nonces, $this );
return $nonces;
}