$add_loader_script
$add_loader_script :
Whether to add the click-to-load map script.
The Geo Mashup static class.
Used primarily for namespace, with methods called using the scope operator, like echo GeoMashup::map();
init()
WordPress init action.
init action, called by WordPress.
register_script(string $handle, string $src, array $deps, string|boolean $ver, boolean $in_footer)
Register the Geo Mashup script appropriate for the request.
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|boolean | $ver | Script version. |
boolean | $in_footer | Whether the script can be loaded in the footer. |
register_style(string $handle, string $src, array $deps, string|boolean $ver, string $media)
Register the Geo Mashup style appropriate for the request.
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|boolean | $ver | Script version. |
string | $media | Stylesheet media target. |
locate_template(string $template_base) : string
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
string | $template_base | The base name of the template. |
The file path of the template found.
join_post_queries(boolean $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?
boolean | $yes_or_no | Whether to activate the join or not. |
implode_assoc(string $inner_glue, string $outer_glue, array $array, mixed $skip_empty, mixed $urlencoded) : string
Helper to turn an associative array into a string of key-value pairs.
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 | Whether to URL encode the output. |
The imploded string.
wp_head()
WordPress action to add relevant geo meta tags to the document head.
wp_head action, called by WordPress.
get_locations_json(string|array $query_args, string $format) : string
Query object locations and return JSON.
Offers customization per object location via a filter, geo_mashup_locations_json_object.
string|array | $query_args | Query variables for GeoMashupDB::get_object_locations(). |
string | $format | (optional) 'JSON' (default) or ARRAY_A |
Queried object locations JSON ( { "object" : [...] } ).
category_legend(string|array $args) : string
Category (term) legend template tag.
Returns a placeholder where a related map should display a legend for the terms of the displayed content. Used to display only categories, now displays all included terms.
string|array | $args | Template tag arguments. |
Placeholder HTML.
list_cats( $content, $category)
If the option is set, add a map link to category lists.
list_cats filter called by WordPress.
$content | ||
$category |
since | 1.0 |
---|
admin_menu()
WordPress action to add the Geo Mashup Options settings admin page.
admin_menu action called by WordPress.
since | 1.0 |
---|
admin_notices()
WordPress action to display important messages in the admin.
admin_notices action called by WordPress.
since | 1.3 |
---|
plugin_action_links( $links, $file)
WordPress action to add custom action links to the plugin listing.
plugin_action_links filter, called by WordPress.
$links | ||
$file |
since | 1.3 |
---|
plugin_row_meta( $links, $file)
WordPress action to add custom meta links to the plugin listing.
plugin_row_meta filter, called by WordPress.
$links | ||
$file |
since | 1.3 |
---|
options_page()
WordPress action to produce the Geo Mashup Options admin page.
Called by the WordPress admin.
since | 1.0 |
---|
current_location(string $output, string $object_name) : object|boolean
Get the location of the current loop object, if any.
Does not work in non-global loops, such as are made with WP_Query.
string | $output | ARRAY_A | ARRAY_N | OBJECT |
string | $object_name | Kind of object we're looking for, 'post', 'user', 'comment'. |
Location object or false if none.
since | 1.3 |
---|
current_location_guess(string $output, string $object_name) : object|boolean
Look at global loops first, then try to guess a current location if needed.
string | $output | ARRAY_A | ARRAY_N | OBJECT |
string | $object_name | Kind of object we're looking for, 'post', 'user', 'comment'. |
Location object or false if none.
None found |
location_info(string|array $args) : string
A template tag to insert location information.
string|array | $args | Template tag arguments. |
The information requested, empty string if none.
since | 1.3 |
---|
post_link( $option_args)
A template tag to insert a link to a post on the mashup.
$option_args |
None found |
show_on_map_link_url(string|array $args) : string
A template tag to return an URL for the current location on the global map page.
string|array | $args | Template tag arguments. |
The URL, empty if no current location is found.
since | 1.3 |
---|---|
todo |
What would happen if the global map is not a post map? |
show_on_map_link(string|array $args) : string
A template tag to insert a link to the current location post on the global map page.
string|array | $args | Tag arguments. |
The link HTML, empty if no current location is found.
since | 1.3 |
---|
visible_posts_list(string|array $args) : string
Visible posts list template tag.
Returns a placeholder where a related map should display a list of the currently visible posts.
string|array | $args | Template tag arguments. |
Placeholder HTML.
since | 1.2 |
---|
list_located_posts(string|array $option_args) : string
List located posts template tag.
Returns an HTML list of all located posts.
string|array | $option_args | Template tag arguments. |
List HTML.
since | 1.1 |
---|
list_located_posts_by_area(string|array $args) : string
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.
string|array | $args | Template tag arguments. |
List HTML.
since | 1.2 |
---|
nearby_list(string|array $args) : string
List nearby items.
Returns an HTML list of objects near the current reference, the current post by default.
string|array | $args | Template tag arguments. |
List HTML.
since | 1.5 |
---|
post_coordinates(integer $places) : array
Post coordinates template tag.
Get the coordinates of the current post.
integer | $places | Maximum number of decimal places to use. |
Array containing 'lat' and 'lng' keys.
since | 1.0 |
---|
rss_ns()
WordPress action to emit GeoRSS namespace.
rss_ns action called by WordPress.
since | 1.0 |
---|
rss_item()
WordPress action to emit GeoRSS tags.
rss_item action called by WordPress.
since | 1.0 |
---|
tabbed_category_index(string|array $args) : string
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.
string|array | $args | Template tag arguments. |
Placeholder HTML.
since | 1.2 |
---|
None found |
convert_map_attributes(array $atts)
Convert deprecated attribute names.
array | $atts | Attributes to modify. |
since | 1.3 |
---|
augment_map_object_location(string $object_name, object $object_location) : array
Augment an object location for display.
Adds term data, object type, author, and label.
string | $object_name | The object type, e.g. 'post', 'user', etc. |
object | $object_location | The object location data. |
The augmented object location data.
since | 1.5 |
---|