[wordpress插件] what3words Autosuggest Pluginwhat3words Autosuggest插件

wordpress 插件 文章 2020-01-21 10:20 674 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

This plugin allows you to add searching for, capturing and validating a 3 word address from a form on your WordPress powered site.

此插件可让您从WordPress支持的网站上的表单中添加搜索,捕获和验证3个单词的地址。

Configuration

配置

Enabling the plugin in a post or page

在帖子或页面中启用插件

To enable the plugin on a post or page, simply add a text input field, contained inside a form, and add the field's id to the plugin's Input Selector(s)

要在帖子或页面上启用插件,只需添加一个包含在表单中的文本输入字段,然后将该字段的 id 添加到插件的 Input Selector(s)

em> configuration option as described below.

em>配置选项,如下所述。

what3words API settings

what3words API设置

A what3words API key is required to use this plugin as it authenticates and interacts with the what3words RESTful API<

要使用此插件,它必须通过what3words API密钥进行身份验证并与what3words交互 RESTful API <

/a>

/ a>

If you don't have a what3words API key yet, you can quickly and easily sign-up and register

如果您还没有what3words API密钥,则可以快速轻松地注册并注册

for one.

一个。

General Settings

常规设置

    • Input Selector(s) – the input fields that the plugin is configured to search for 3 word addresses.

      输入选择器-插件配置为搜索3个字地址的 input 字段。

      These should be specified as a comma

      这些应指定为逗号

      separated list of jQuery object selectors.

      分隔的jQuery对象选择器列表。

    • Input Placeholder Text – an optional placeholder to be displayed in the input fields that are configured in the Input Selector(s) option.

      输入占位符文本–在输入选择器选项中配置的 input 字段中显示的可选占位符。

    • Suggestion Count – by default, the plugin will return 3 suggestions;

      建议计数-默认情况下,插件将返回3条建议;

      you can choose to display between 8 and 8 suggestions.

      您可以选择显示8到8条建议。

    Localisation Settings

    本地化设置

      • Input Language – specifies the default language that should be used for searching for 3 word addresses.

        输入语言–指定用于搜索3个单词地址的默认语言。

        If Multilingual Search

        如果多语言搜索

        is disabled;

        被禁用;

        then only 3 word addresses in the Input Language will be used.

        那么将仅使用输入语言中的3个单词地址。

      • Multilingual Search – by default, the plugin searches for 3 word addresses in all languages;

        多语言搜索-默认情况下,该插件以 all 语言搜索3个单词地址;

        you can restrict searches to a single language by

        您可以通过
        将搜索限制为一种语言

        disabling this option.

        禁用此选项。

      • Enable Country Filtering / Country – by default, 3 word address suggestions will be returned for all countries.

        启用国家/地区过滤-默认情况下,将为所有国家/地区返回3个字的地址建议。

        You can configure the plugin

        您可以配置插件

        to restrict suggestions to a single country by checking the Enable Country Filtering checkbox and selecting the desired country in the

        通过选中启用国家/地区过滤复选框并在
        中选择所需的国家/地区,将建议限制在一个国家/地区

        Country dropdown.

        国家下拉列表。

      • Text Direction – specifies the text scanning direction of the 3 word address search box.

        文本方向–指定3字地址搜索框的文本扫描方向。

        Options are Left to right or Right to left (e.g. for Arabic).

        选项为从左向右从右向左(例如阿拉伯语)。

      WooCommerce Support

      WooCommerce支持

      The plugin also allows you to automatically add a 3 word address validation field to a WooCommerce checkout form and save the 3 word address against the customer’s order details.

      该插件还允许您将3字地址验证字段自动添加到WooCommerce结帐表单,并根据客户的订单明细保存3字地址。

      By enabling WooCommerce checkout integration, the #shipping_w3w and #billing_w3w selectors will be automagically added to the list of Input Selector(s)

      通过启用WooCommerce结帐集成,#shipping_w3w #billing_w3w 选择器将自动添加到输入选择器的列表中

      .

      Filter Support And Usage

      过滤器支持和用法

      what3words AutoSuggest plugin supports a single filter to change the default set of installation settings and options at plugin activation time.

      what3words AutoSuggest插件支持单个过滤器,以在插件激活时更改默认的安装设置和选项集。

      what3wordssearchbox_default_settings

      what3wordssearchbox_default_settings

      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插件设置/选项,则将一次调用此过滤器。

      Example: Add the date and time that the plugin was first activated

      示例:添加首次激活插件的日期和时间

      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;

      }

      }

安装步骤

    1. You can install what3words AutoSuggest plugin automatically from the WordPress admin panel.

    2. 您可以从WordPress管理面板自动安装what3words AutoSuggest插件。

      From the Dashboard, navigate to Plugins / Add New and search for “what3words AutoSuggest plugin” and click on the “Install Now” button.<

      在控制台中,导航至插件/添加新,然后搜索“ what3words AutoSuggest插件” ,然后单击“立即安装” 按钮。

      /li>

      / li>

    3. Or you can install what3words AutoSuggest plugin manually.

    4. 或者您可以手动安装what3words AutoSuggest插件。

      Download the plugin Zip archive and uncompress it.

      下载插件Zip存档并解压缩。

      Copy or upload the what3words-searchbox folder to the wp-content/plugins folder on your web server.

    5. what3words-searchbox 文件夹复制或上传到Web服务器上的 wp-content / plugins 文件夹。

    6. Activate the plugin.

    7. 激活插件。

      From the Dashboard, navigate to Plugins and click on the “Activate” link under the entry for What3words Searchbox.

    8. 在控制台中,导航至“插件”,然后单击“ What3words搜索框”条目下方的“激活” 链接。

    9. Customise and configure the plugin;

    10. 自定义和配置插件;

      from the Dashboard, navigate to the Settings / what3words AutoSuggest plugin page or click on the “Settings” link from the Plugins page on the Dashboard.

    11. 从仪表板上,导航到 Settings / what3words AutoSuggest插件页面,或在仪表板“ Plugins”页面上单击“ Settings” 链接。

    12. Click on the “Save what3words AutoSuggest plugin Settings” button to preserve your chosen settings and options.
    13. 单击“保存what3words AutoSuggest插件设置” 按钮以保留您选择的设置和选项。

下载地址

https://downloads.wordpress.org/plugin/3-word-address-validation-field.zip

https://downloads.wordpress.org/plugin/3-word-address-validation-field.zip

-EOF-

AI助手支持GPT4.0