WordPress.org

Plugin Directory

wiki:PostLocation

Post Location

Download Latest

This plugin is designed to attach address information to each post in WordPress 1.5 and later. Please read the documentation first then if you have questions please feel free to contact the author.

Installation

Drop postlocation.php into your WordPress plugins directory, and then Activate it on the Plugins tab of the WordPress admin console.

Functions You Can Use

Associative Indexes currently available: 'MapQuest', 'GoogleMaps', 'YahooMaps'

  • get_map_link($index, $preText = , $street = , $city = , $state = , $zip = , $country = )
    • Returns a string including HREF tags for the specified service. Returns NULL if there is no location specified for this post.
    • $index - the associative index of the service you are interested in
    • $preText - text you want to appear outside of the hyperlink
    • $street, $city, $state, $zip, $country - all are optional parameters that can be used to override the information for the post.

Example: get_map_url('GoogleMaps', ' from ') -> " from <a href="http://maps.google.com/?q= the post location "> Name of Post Location </a>"

  • NOTE: this function was formerly called get_map_url() and was changed 3-07-2005
  • map_urls($street = , $city = , $state = , $zip = , $country = )
    • Returns an associative multidimensional array with indexes on the service names. This function is really intended for internal use only, but is exposed if someone else finds a use for this.
    • $street, $city, $state, $zip, $country - all are optional parameters that can be used to override the information for the post.
  • get_Location()
  • get_Street()
  • get_City()
  • get_State()
  • get_Zip()
  • get_Country()

The following functions simply echo the values given from the corresponding get_ functions. I will most likely eliminate them in future revisions.

  • the_Location()
  • the_Street()
  • the_City()
  • the_State()
  • the_Zip()
  • the_Country()

Support

If you have a problem with this plugin, please file a bug and make sure to list "post-location" as the plugin. This plugin is still under development and causes conflict with the GeoPlugin at present (soon to be resolved).

Last modified 13 years ago Last modified on 03/08/05 05:09:08