APP_Media_Manager
Package
Description Description
Methods Methods
- __construct
- ajax_delete_transients — Delete any stored transients when media manager UI is closed.
- ajax_get_media_manager_options — Ajax callback to retrieves the db options for a specific media manager ID.
- ajax_refresh_attachments — Refreshes the attachments/embed list based on the user selection.
- enqueue_media_manager — Enqueues the JS scripts that output WP's media uploader.
- get_oembed_object — Attempts to fetch an oembed object with metadata for a provided URL using oEmbed.
- get_post_attachments — Get the attachments for a given object.
- handle_embed_field — Handles embedded media related posted data and retrieves an updated list of all the embed attachments for the current object.
- handle_media_field — Handles media related posted data and retrieves an updated list of all the attachments for the current object.
- handle_media_upload — Process all posted inputs that contain attachment ID's that need to be assigned to a post or user.
- init_hooks
- maybe_clear_old_attachments — Unassigns or deletes any previous attachments that are not present on the current attachment enqueue list.
- output_hidden_inputs — Outputs the hidden inputs that act as helpers for the media manager JS.
- output_media_manager — Outputs the media manager HTML markup.
- restrict_media_library — Restrict media library to files uploaded by the current user with no parent or whose parent is the current post ID.
- set_attachment_mm_id — Assign a meta key containing the media manager parent ID AND a default attach type to each new media attachment added through the media manager.
- set_attachment_parent — Set parent id and type to the attachment meta.
- validate_upload_restrictions — Validates the files the current user is trying to upload by checking their mime types and the preset file limit.