GeoMashup
[ class tree: GeoMashup ] [ index: GeoMashup ] [ all elements ]

Class: GeoMashup

Source Location: /geo-mashup.php

Class Overview


The Geo Mashup static class.


Author(s):

Methods



Class Details

[line 47]
The Geo Mashup static class.

Used primarily for namespace, with methods called using the scope operator, like echo GeoMashup::map();




Tags:

since:  1.0
access:  public


[ Top ]


Class Methods


static method activation_hook [line 219]

static void activation_hook( )

WordPress hook to perform activation tasks.



Tags:

since:  1.4
access:  public


[ Top ]

static method admin_menu [line 1087]

static void admin_menu( )

WordPress action to add the Geo Mashup Options settings admin page.

admin_menu action called by WordPress.




Tags:

since:  1.0
access:  public


[ Top ]

static method admin_notices [line 1101]

static void admin_notices( )

WordPress action to display important messages in the admin.

admin_notices action called by WordPress.




Tags:

since:  1.3
access:  public


[ Top ]

static method ajax_edit [line 386]

static void ajax_edit( )

WordPress action to perform an ajax edit operation and echo results.



Tags:

since:  1.3
access:  public


[ Top ]

static method ajax_kml_attachments [line 555]

static void ajax_kml_attachments( )

Echo a JSONP array of URLs of KML or KMZ attachments for posts.

since 1.4




Tags:

access:  public


[ Top ]

static method build_map_data [line 694]

static void build_map_data( $query)



Tags:

access:  public


Parameters:

   $query  

[ Top ]

static method category_legend [line 1034]

static string category_legend( [string|array $args = null])

Category legend template tag.

Returns a placeholder where a related map should display a legend for the categories of the displayed content.




Tags:

return:  Placeholder HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Category_Legend
since:  1.1
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method category_name [line 1008]

static string category_name( [string|array $option_args = null])

Category name template tag.

If there is a map_cat parameter, return the name of that category.




Tags:

return:  Category name.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Category_Name
since:  1.1
access:  public


Parameters:

string|array   $option_args   Template tag arguments.

[ Top ]

static method current_location [line 1178]

static object|bool current_location( [string $output = OBJECT])

Get the location of the current loop object, if any.



Tags:

return:  Location object or false if none.
since:  1.3
access:  public


Parameters:

string   $output   ARRAY_A | ARRAY_N | OBJECT

[ Top ]

static method dependent_init [line 242]

static void dependent_init( )

WordPress action to supply an init action for plugins that would like to use Geo Mashup APIs.



Tags:

since:  1.4
access:  public
uses:  do_action() - geo_mashup_init Fired when Geo Mashup is loaded and ready.


[ Top ]

static method explode_assoc [line 452]

static array explode_assoc( string $glue1, string $glue2, string $str)

Helper to turn a string of key-value pairs into an associative array.



Tags:

return:  The associative array.
since:  1.0
access:  public


Parameters:

string   $glue1   Pair separator.
string   $glue2   Key/value separator.
string   $str   String to explode.

[ Top ]

static method full_post [line 985]

static string full_post( [string|array $args = null])

Full post template tag.

Returns a placeholder where a related map should display the full post content of the currently selected marker.




Tags:

return:  Placeholder HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Full_Post
since:  1.1
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method geo_query [line 364]

static void geo_query( )

Process an AJAX geo query.



Tags:

since:  1.3
access:  public
usedby:  GeoMashup::template_redirect()
uses:  geo-query.php


[ Top ]

static method get_kml_attachment_urls [line 521]

static array get_kml_attachment_urls( id $post_id)

Get an array of URLs of KML or KMZ attachments for a post.



Tags:

return:  Array of URL strings.
since:  1.1
access:  public


Parameters:

id   $post_id  

[ Top ]

static method get_language_code [line 496]

static string get_language_code( )

Guess the best language code for the current context.

Takes some plugins and common practices into account.




Tags:

return:  Language code.
since:  1.4
access:  public


[ Top ]

static method get_locations_json [line 607]

static string get_locations_json( string|array $query_args, [string $format = 'JSON'])

Query object locations and return JSON.

Offers customization per object location via a filter, geo_mashup_locations_json_object.




Tags:

return:  Queried object locations JSON ( { "object" : [...] } ).
since:  1.2
access:  public
usedby:  $geo_mashup_custom
uses:  GeoMashupDB::get_object_locations()
uses:  apply_filters() - the_title Filter post titles.
uses:  apply_filters() - geo_mashup_locations_json_object Filter each location associative array before conversion to JSON.


Parameters:

string|array   $query_args   Query variables for GeoMashupDB::get_object_locations().
string   $format   (optional) 'JSON' (default) or ARRAY_A

[ Top ]

static method implode_assoc [line 474]

static string implode_assoc( string $inner_glue, string $outer_glue, array $array, [mixed $skip_empty = false], [mixed $urlencoded = false])

Helper to turn an associative array into a string of key-value pairs.



Tags:

return:  The imploded string.
since:  1.0
access:  public


Parameters:

string   $inner_glue   Key/value separator.
string   $outer_glue   Pair separator.
array   $array   Array to implode.
mixed   $skip_empty   Whether to include empty values in output.
mixed   $urlencoded   Whetern to URL encode the output.

[ Top ]

static method init [line 90]

static void init( )

WordPress init action.

init action, called by WordPress.




Tags:

since:  1.2
access:  public


[ Top ]

static method is_options_page [line 77]

static bool is_options_page( )

Test to see if the current request is for the Geo Mashup options page.



Tags:

return:  Whether this is a an options page request.
since:  1.4
access:  public


[ Top ]

static method join_post_queries [line 438]

static void join_post_queries( bool $yes_or_no)

Toggle limiting of query_posts to located posts only, with Geo Mashup query extensions.

When enabled, only posts with locations will be returned from WordPress query_posts() and related functions. Also adds Geo Mashup public query variables.

Caution - what if a future Geo Mashup incorporates multiple locations per object?




Tags:

since:  1.3
access:  public


Parameters:

bool   $yes_or_no   Whether to activate the join or not.

[ Top ]

static method list_cats [line 1051]

static void list_cats( $content, [ $category = null])

If the option is set, add a map link to category lists.

list_cats filter called by WordPress.




Tags:

since:  1.0
access:  public


Parameters:

   $content  
   $category  

[ Top ]

static method list_located_posts [line 1376]

static string list_located_posts( [ $option_args = null], string|array $args)

List located posts template tag.

Returns an HTML list of all located posts.




Tags:

return:  List HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#List_Located_Posts
since:  1.1
access:  public


Parameters:

string|array   $args   Template tag arguments.
   $option_args  

[ Top ]

static method list_located_posts_by_area [line 1403]

static string list_located_posts_by_area( string|array $args)

List located posts by area template tag.

Returns an HTML list of all located posts by country and state. May try to look up this information when absent.




Tags:

return:  List HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#List_Located_Posts_By_Area
since:  1.2
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method load [line 62]

static void load( )

Load Geo Mashup.

Initializations that can be done before init().




Tags:

since:  1.2
access:  public


[ Top ]

static method locate_template [line 319]

static string locate_template( string $template_base)

Locate a Geo Mashup template.

Geo Mashup looks for templates given a certain base name. Given a base name of 'info-window', it will return the first of: 'geo-mashup-info-window.php' in the active theme directory 'info-window.php' in the geo-mashup-custom plugin directory 'default-templates/info-window.php' in the geo-mashup plugin directory




Tags:

return:  The file path of the template found.
since:  1.4
access:  public


Parameters:

string   $template_base   The base name of the template.

[ Top ]

static method location_info [line 1211]

static string location_info( [string|array $args = ''])

A template tag to insert location information.



Tags:

return:  The information requested, empty string if none.
since:  1.3
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method map [line 778]

static string map( [string|array $atts = null])

The map template tag.

Returns HTML for a Google map. Must use with echo in a template: echo GeoMashup::map();.




Tags:

return:  The HTML for the requested map.
staticvar:  $map_number $map_number: Used to index maps per request.
link:  tag parameter documentation
since:  1.0
access:  public
uses:  $_SERVER['QUERY_STRING'] - The first global map on a page uses query string parameters like tag parameters.


Parameters:

string|array   $atts   Template tag parameters.

[ Top ]

static method options_page [line 1165]

static void options_page( )

WordPress action to produce the Geo Mashup Options admin page.

Called by the WordPress admin.




Tags:

since:  1.0
access:  public


[ Top ]

static method plugin_action_links [line 1131]

static void plugin_action_links( $links, $file)

WordPress action to add custom action links to the plugin listing.

plugin_action_links filter, called by WordPress.




Tags:

since:  1.3
access:  public


Parameters:

   $links  
   $file  

[ Top ]

static method plugin_row_meta [line 1148]

static void plugin_row_meta( $links, $file)

WordPress action to add custom meta links to the plugin listing.

plugin_row_meta filter, called by WordPress.




Tags:

since:  1.3
access:  public


Parameters:

   $links  
   $file  

[ Top ]

static method post_coordinates [line 1470]

static array post_coordinates( [string|array $places = 10])

Post coordinates template tag.

Get the coordinates of the current post.




Tags:

return:  Array containing 'lat' and 'lng' keys.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Post_Coordinates
deprecated:  1.3 Use GeoMashup::current_location()
since:  1.0
access:  public


Parameters:

string|array   $places   Maximum number of decimal places to use.

[ Top ]

static method post_link [line 1258]

static void post_link( [ $option_args = ''])

A template tag to insert a link to a post on the mashup.



Tags:

see:  GeoMashup::show_on_map_link()
access:  public


Parameters:

   $option_args  

[ Top ]

static method query_vars [line 300]

static void query_vars( $public_query_vars)

WordPress filter to add Geo Mashup query variables.



Tags:

since:  1.3
access:  public


Parameters:

   $public_query_vars  

[ Top ]

static method register_script [line 257]

static void register_script( string $handle, string $src, [array $deps = array()], [string $ver = false], [bool $in_footer = false])

Register the Geo Mashup script appropriate for the request.



Tags:

since:  1.4
access:  public


Parameters:

string   $handle   Global tag for the script.
string   $src   Path to the script from the root directory of Geo Mashup.
array   $deps   Array of dependency handles.
string   $ver   Script version.
bool   $in_footer   Whether the script can be loaded in the footer.

[ Top ]

static method register_style [line 275]

static void register_style( string $handle, string $src, [array $deps = array()], [string $ver = false], [bool $media = 'all'])

Register the Geo Mashup style appropriate for the request.



Tags:

since:  1.4
access:  public


Parameters:

string   $handle   Global tag for the style.
string   $src   Path to the stylesheet from the root directory of Geo Mashup.
array   $deps   Array of dependency handles.
string   $ver   Script version.
bool   $media   Stylesheet media target.

[ Top ]

static method rss_item [line 1512]

static void rss_item( )

WordPress action to emit GeoRSS tags.

rss_item action called by WordPress.




Tags:

since:  1.0
access:  public


[ Top ]

static method rss_ns [line 1500]

static void rss_ns( )

WordPress action to emit GeoRSS namespace.

rss_ns action called by WordPress.




Tags:

since:  1.0
access:  public


[ Top ]

static method show_on_map_link [line 1309]

static string show_on_map_link( [ $args = null])

A template tag to insert a link to the current location post on the global map page.



Tags:

return:  The link HTML, empty if no current location is found.
since:  1.3
access:  public


Parameters:

   $args  

[ Top ]

static method show_on_map_link_url [line 1270]

static string show_on_map_link_url( [ $args = null])

A template tag to return an URL for the current location on the global map page.



Tags:

return:  The URL, empty if no current location is found.
since:  1.3
access:  public


Parameters:

   $args  

[ Top ]

static method tabbed_category_index [line 1535]

static string tabbed_category_index( string|array $args)

Tabbed category index template tag.

Returns a placeholder where a related map should display a list of map objects by category, organized into HTML suited for presentation as tabs.




Tags:

return:  Placeholder HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Visible_Posts_List
since:  1.2
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method template_redirect [line 343]

static void template_redirect( )

WordPress action to deliver templated Geo Mashup content.



Tags:

since:  1.3
access:  public
uses:  render_map
uses:  GeoMashup::geo_query()


[ Top ]

static method visible_posts_list [line 1344]

static string visible_posts_list( [string|array $args = null])

Visible posts list template tag.

Returns a placeholder where a related map should display a list of the currently visible posts.




Tags:

return:  Placeholder HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Visible_Posts_List
since:  1.2
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method wp_footer [line 288]

static void wp_footer( )

WordPress action to add things like scripts to the footer.



Tags:

since:  1.4
access:  public


[ Top ]

static method wp_head [line 578]

static void wp_head( )

WordPress action to add relevant geo meta tags to the document head.

wp_head action, called by WordPress.




Tags:

since:  1.0
access:  public


[ Top ]


Documentation generated on Sat, 09 Jul 2011 21:54:53 -0700 by phpDocumentor 1.4.3