\GeoMashupPostUIManager

A manager for post/page location user interfaces.

Singleton instantiated immediately.

Summary

Methods
Properties
Constants
get_instance()
enqueue_jquery_styles()
enqueue_form_client_items()
save_posted_object_location()
__construct()
init()
enqueue_scripts()
admin_menu()
print_form()
save_post()
content_save_pre()
replace_save_pre_shortcode()
media_meta()
admin_print_scripts()
upload_mimes()
wp_handle_upload()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
get_submit_action()
$inline_location
N/A

Properties

$inline_location

$inline_location : array

Location found in geo_mashup_save_location shortcode.

Type

array

Methods

get_instance()

get_instance(string $name) : \GeoMashupPostUIManager

Get the single instance of this class.

Parameters

string $name

The class name, this class by default.

Returns

\GeoMashupPostUIManager

The instance.

enqueue_jquery_styles()

enqueue_jquery_styles()

Queue UI styles to match the jQuery version.

enqueue_form_client_items()

enqueue_form_client_items()

Queue styles and scripts for the location editor form.

save_posted_object_location()

save_posted_object_location(string $object_name, null|integer $object_id) : boolean|\WP_Error

Handle old non-strict method calls with only one argument.

Parameters

string $object_name
null|integer $object_id

Returns

boolean|\WP_Error

__construct()

__construct()

PHP5 Constructor

init()

init()

Initialize for use in relevant post editing requests.

init action called by WordPress.

admin_menu()

admin_menu()

Add a location meta box to the post editors.

admin_menu action called by Wordpress.

print_form()

print_form()

Print the post editor form.

save_post()

save_post(\id $post_id, object $post) : boolean|\WP_Error

When a post is saved, save any posted location for it.

save_post action called by WordPress.

Parameters

\id $post_id
object $post

Returns

boolean|\WP_Error

content_save_pre()

content_save_pre( $content)

Extract inline save location shortcodes from post content before it is saved.

content_save_pre filter called by Wordpress.

Parameters

$content

replace_save_pre_shortcode()

replace_save_pre_shortcode(array $shortcode_match) : \The

Store the inline location from a save location shortcode before it is removed.

Parameters

array $shortcode_match

Returns

\The —

matched content, or an empty string if it was a save location shortcode.

media_meta()

media_meta( $content,  $post)

Add AJAX uploaded KML to the location editor map.

media_meta filter called by WordPress.

Parameters

$content
$post

admin_print_scripts()

admin_print_scripts( $not_used)

Add Browser-uploaded KML to the location editor map.

admin_print_scripts action called by WordPress.

Parameters

$not_used

upload_mimes()

upload_mimes( $mimes)

Add geo mime types to allowable uploads.

upload_mimes filter called by WordPress.

Parameters

$mimes

wp_handle_upload()

wp_handle_upload( $args)

If an upload is KML, put the URL in an option to be loaded in the response

wp_handle_upload filter called by WordPress.

Parameters

$args

get_submit_action()

get_submit_action()

Determine the appropriate action from posted data.