[wordpress插件] Advanced Custom Fields – Location Field add-on高级自定义字段–位置字段附加组件

wordpress 插件 文章 2020-02-07 05:20 522 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

This is an add-on for the Advanced Custom Fields

这是高级自定义字段的附加组件

WordPress plugin and will not provide any functionality to WordPress unless Advanced Custom Fields is installed

WordPress插件,除非安装了高级自定义字段,否则不会为WordPress提供任何功能

and activated.

并激活。

The Location field provides:

“位置”字段提供:

    • a search field where you can type in some coordinates or an address and hit Enter.

    • 一个搜索字段,您可以在其中输入一些坐标或地址,然后按 Enter

    • a Google map which you can click at the desired location.
    • 您可以在所需位置单击的Google地图。

    In both cases, Google will find the location and return the coordinates and the complete address, if you want it complete.

    在这两种情况下,Google都会找到该位置并返回坐标和完整的地址(如果需要的话)。

    A marker will be added at the desired location.

    标记将添加到所需位置。

    Source Repository on GitHub

    GitHub上的源存储库

    https://github.com/julienbechade/acf-location-field

    https://github.com/julienbechade/acf-location-field

    Bugs, Questions or Suggestions

    错误,问题或建议

    https://github.com/julienbechade/acf-location-field/issues

    https://github.com/julienbechade/acf-location-field/issues

    Usage

    用法

    Make sure you read the Advanced Custom Fields's documentation first.

    确保首先阅读高级自定义字段的文档。

    p>

    >

    Back-end

    后端

    The Location field comes with 3 options:

    “位置”字段带有3个选项:

      1. The map address let you choose the value(s) to return on the front-end:

      2. 通过地图地址,您可以选择要在前端返回的值:

          • Coordinates & address
          • 坐标和地址

          • Coordinates
          • 坐标

        • The map center let you set the coordinates used to center the initial blank map.
        • 地图中心使您可以设置用于将初始空白地图居中的坐标。

        • The map zoom.
        • 地图缩放。

      Front-end

      前端

      Retrieving the value(s) on the front-end differs according to the Map address options.

      根据“映射地址”选项,检索前端的值不同。

        • Coordinates & address
           

        • 坐标和地址
           

          $location = get_field(‘location’);

          $ location = get_field(‘location’);

          echo $location[‘address’];

          echo $ location [‘address’];

          echo $location[‘coordinates’];

          echo $ location ['coordinates'];

        • Coordinates
           

        • 坐标
           

          the_field(‘location’);

        • the_field(‘location’);

安装步骤

The Location Field plugin can be used as a WordPress plugin or included in other plugins or themes.

“位置字段”插件可以用作WordPress插件,也可以包含在其他插件或主题中。

There is no need to call the Advanced Custom Fields register_field() method for this field.

无需为此字段调用高级自定义字段 register_field()方法。

    • WordPress plugin

    • WordPress插件

        1. Download the plugin and extract it to /wp-content/plugins/ directory.
        2. 下载插件并将其解压缩到 / wp-content / plugins / 目录。

        3. Activate the plugin through the Plugins menu in WordPress.
        4. 通过WordPress中的插件菜单激活插件。

      1. Added to Theme or Plugin

      2. 已添加到主题或插件

          1. Download the plugin and extract it to your theme or plugin directory.
          2. 下载插件并将其解压缩到主题或插件目录。

          3. Include the location-field.php file in you theme’s functions.php or plugin file.
               

          4. 在主题的 functions.php 或插件文件中包含 location-field.php 文件。
               

            include_once( rtrim( dirname( FILE ), ‘/’ ) . ‘/acf-location-field/location-field.php’ );

          5. include_once(rtrim(dirname( FILE ),‘/’)。‘/acf-location-field/location-field.php’);

下载地址

https://downloads.wordpress.org/plugin/advanced-custom-fields-location-field-add-on.zip

https://downloads.wordpress.org/plugin/advanced-custom-fields-location-field-add-on.zip

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Create QR Code创建二维码
[wordpress插件] bbp buddypress profile informationbbp buddypress个人资料信息
[wordpress插件] Custom Shipping Options for MemberMouseMemberMouse的自定义运送选项
[wordpress插件] Category List Icon类别列表图标
[wordpress插件] BUKAZU Search widgetBUKZU搜索小部件
随便看看
微信公众号免300认证教程 5200
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4605
小程序广告组件通过审核,但是小程序内没有显示广告? 4482
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8541
问题? 8260
如何快速搭建抽奖助手小程序(无需代码知识) 5323
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6591
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5876
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5534
如何解决渲染层网络错误Failed to load media? 16778