wp_explain_nonce()获取随机数动作函数“Are you sure”信息

目录

描述

译文

检索随机数动作函数“Are you sure”信息。

该动作函数分裂为动词和名词。动作函数格式为verb(动词)-action(名词)_extra。破折号前是动作名称,动作名称均为字母,不包括空格和数字。破折号后、下划线(如果有下划线)前是名词,名词也由字母组成。

动作函数需要调用过滤器,而WordPress并未定义过滤器。用户可用插件的过滤器来解释访问者看到“Are you sure”时的随机数动作函数。过滤器格式为“explain_nonce_$verb-$noun”,用所找到的动词代替其中的$verb,所找到的名次代替其中的$noun。这两个参数来源于带有额外文本(动作函数下划线后的内容)的'Are you sure you want to do this?'信息。

原文

Retrieve nonce action 'Are you sure' message.

The action is split by verb and noun. The action format is as follows: verb-action_extra. The verb is before the first dash and has the format of letters and no spaces and numbers. The noun is after the dash and before the underscore, if an underscore exists. The noun is also only letters.

The filter will be called for any action, which is not defined by WordPress. You may use the filter for your plugin to explain nonce actions to the user, when they get the "Are you sure?" message. The filter is in the format of 'explain_nonce_$verb-$noun' with the $verb replaced by the found verb and the $noun replaced by the found noun. The two parameters that are given to the hook are the localized 'Are you sure you want to do this?' message with the extra text (the text after the underscore).

wp_explain_nonce() 描述

用法

<?php wp_explain_nonce$action ?>

wp_explain_nonce() 用法

参数

$action

(string) (必填) Nonce action.

默认值: None

wp_explain_nonce() 参数

返回值

(string) 

Are you sure message.

wp_explain_nonce() 返回值

历史

  • Deprecated: 3.4.1
  • 添加于 版本: 2.0.4

wp_explain_nonce() 历史

源文件

wp_explain_nonce() was located in wp-includes/functions.php. It has been moved to wp-includes/deprecated.php

wp_explain_nonce() 源文件

相关