[wordpress插件] Convert Address to Google Maps Link将地址转换为Google Maps链接

wordpress 插件 文章 2020-04-01 23:20 489 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

NORMAL LINKS:

正常链接:

This simple plugin converts addresses in “

” tags into links that open a Google Map in a new window.

这个简单的插件将“ <地址> ”标签中的地址转换为可在新窗口中打开Goog​​le Map的链接。

It also converts any address in a “.address” class into a Google Map link that opens in a new window.

还将“ .address”类中的任何地址转换为在新窗口中打开的Google Map链接。

NOTE: You need to put the address inside the

html tag or within an html element with the .address class for this plugin to

注意:您需要将该地址放在

html标记内或带有 .address 类的html元素内,此插件才能

work.

工作。

For example, you would need to write the following into your code:

3 Abbey Rd, London NW8 9AY, United Kingdom
OR

例如,您需要在代码中写入以下内容: <地址>英国伦敦NW8 9AY,3 Abbey Rd

3 Abbey Rd, London NW8 9AY, United Kingdom OR

3 Abbey Rd, London NW8 9AY, United Kingdom

英国伦敦NW8 9AY 3 Abbey Rd

英国伦敦NW8 9AY 3 Abbey Rd

p>

>

IFRAME LINKS:

框架链接:

If you want to display the Google Map in an iframe, just use the .address-iframe class in your markup.

如果要在iframe中显示Google Map,只需在标记中使用 .address-iframe 类。

For example,

3 Abbey Rd, London NW8 9AY, United Kingdom
(Thanks to Mike Jasper for this idea and code!)

com /“ rel =” nofollow“>迈克·贾斯珀了解这个想法和代码!)

FYI: This plugin is great for themes with custom fields that supply the address, but is probably not too useful for themes that don’t, because you’ll need to enter the text view to add the appropriate html markup.

仅供参考:此插件非常适合带有提供地址的自定义字段的主题,但对于没有主题的主题可能不太有用,因为您需要进入文本视图以添加适当的html标记。

Thanks!

谢谢!

Finally, many many thanks to Mike Jasper , who wrote the javascript that powers this plugin.

最后,非常感谢 Mike Jasper ,他编写了为该插件提供动力的JavaScript。

I merely repackaged his code.

我只是重新打包了他的代码。

安装步骤

    1. Unzip and upload the php file to your wordpress plugin directory
    2. 解压缩php文件并将其上传到您的wordpress插件目录

    3. Activate the plugin
    4. 激活插件

下载地址
https://downloads.wordpress.org/plugin/convert-address-to-google-maps-link.zip
-EOF-

AI助手支持GPT4.0