输入选择器 em>的列表中.
p>
Filter Support And Usage
过滤器支持和用法 h3>
what3words AutoSuggest plugin supports a single filter to change the default set of installation settings and options at plugin activation time.
what3words AutoSuggest插件支持单个过滤器,以在插件激活时更改默认的安装设置和选项集。 p>
what3wordssearchbox_default_settings
what3wordssearchbox_default_settings h4>
Applied to the default set of plugin settings and options.
应用于默认的插件设置和选项集。
Note that this filter is called once, upon plugin activation, when there are no what3words AutoSuggest plugin settings/options existing in the database.
请注意,在插件激活后,如果数据库中不存在what3words AutoSuggest插件设置/选项,则将一次调用此过滤器。 p>
Example: Add the date and time that the plugin was first activated
示例: em>添加首次激活插件的日期和时间 p>add_filter ('what3wordssearchbox_default_settings', 'add_activation_timestamp'); add_filter('what3wordssearchbox_default_settings','add_activation_timestamp');function add_activation_timestamp ($options) {
函数add_activation_timestamp($ options){
// options = array (option name => option value)
// options =数组(选项名称=>选项值)
$options['plugin_activation_timestamp'] = date (DATE_ATOM);
$ options ['plugin_activation_timestamp'] =日期(DATE_ATOM);
return $options;
返回$ options;
}
}
code> pre>