钩子文档

customize_refresh_nonces

💡 云策文档标注

概述

本文档介绍了 WordPress 自定义器(Customizer)中用于过滤 nonces 的 Hook。它允许开发者修改保存和预览操作的非刷新 nonces 数组。

关键要点

  • Hook 名称:customize_refresh_nonces
  • 参数:$nonces(非刷新 nonces 数组)和 $manager(WP_Customize_Manager 实例)
  • 用途:过滤自定义器中的 nonces,常用于增强安全性或自定义行为
  • 相关函数:WP_Customize_Manager::get_nonces() 用于获取 nonces
  • 引入版本:WordPress 4.2.0

📄 原文内容

Filters nonces for Customizer.

Parameters

$noncesstring[]
Array of refreshed nonces for save and preview actions.
$managerWP_Customize_Manager

Source

$nonces = apply_filters( 'customize_refresh_nonces', $nonces, $this );

Changelog

Version Description
4.2.0 Introduced.