该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Convert Address to Google Maps Link

描述

NORMAL LINKS:
This simple plugin converts addresses in “<address></address>” tags into links that open a Google Map in a new window. It also converts any address in a “.address” class into a Google Map link that opens in a new window.

NOTE: You need to put the address inside the <address></address> html tag or within an html element with the .address class for this plugin to work. For example, you would need to write the following into your code: <address>3 Abbey Rd, London NW8 9AY, United Kingdom</address> OR <span class=“address”>3 Abbey Rd, London NW8 9AY, United Kingdom</span> OR <div class=“address”>3 Abbey Rd, London NW8 9AY, United Kingdom</div>

IFRAME LINKS:
If you want to display the Google Map in an iframe, just use the .address-iframe class in your markup. For example, <div class=“address-iframe”>3 Abbey Rd, London NW8 9AY, United Kingdom</div> (Thanks to Mike Jasper for this idea and code!)

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. Thanks!

Finally, many many thanks to Mike Jasper , who wrote the javascript that powers this plugin. I merely repackaged his code.

屏幕截图

  • Using the ‘address-iframe’ class
  • Using the html5 ‘

安装

  1. Unzip and upload the php file to your wordpress plugin directory
  2. Activate the plugin

常见问题

Where is the settings page?

There are no settings for this plugin.

This isn’t working.

Make sure you put the address inside the <address></address> html tag or inside an html element with the address class. This is required.

评价

2016年9月3日
I use this temporarily to create links to Google Maps. I place the code in a page and preview the page, I hover over the hypertext and copy the link and then I use this copied link to place into my REAL pages so that Mobile phones can prompt for either your default browser or your Google Maps App. Without this generated code...I found that the Google Maps App was not prompted.
阅读所有3条评价

贡献者及开发者

“Convert Address to Google Maps Link” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

更新日志

1.2

  • Added support for ‘.address-iframe’ class

1.1

  • Added support for ‘.address’ class

1.0

  • Initial release