+ ajax_render_media() + +
+ + +Ajax Render Media
+ +
+ public
+ ajax_render_media() : void
+
+ This method is responsible for providing the ajax response for the media uploader +preview.
+diff --git a/docs/reference/classes/WP-Backstage-Component.html b/docs/reference/classes/WP-Backstage-Component.html index 9a29862..64bbba3 100644 --- a/docs/reference/classes/WP-Backstage-Component.html +++ b/docs/reference/classes/WP-Backstage-Component.html @@ -4700,7 +4700,7 @@
Full rewrite of the media uploader markup.
Adds error and loader elements and removes the clone
methodology in favor of ajax rendering.
Full rewrite of the media uploader markup.
Adds error and loader elements and removes the clone
methodology in favor of ajax rendering.
Full rewrite of the media uploader markup.
Adds error and loader elements and removes the clone
methodology in favor of ajax rendering.
Full rewrite of the media uploader markup.
Adds error and loader elements and removes the clone
methodology in favor of ajax rendering.
Full rewrite of the media uploader markup.
Adds error and loader elements and removes the clone
methodology in favor of ajax rendering.
Full rewrite of the media uploader markup.
Adds error and loader elements and removes the clone
methodology in favor of ajax rendering.
Full rewrite of the media uploader markup.
Adds error and loader elements and removes the clone
methodology in favor of ajax rendering.
Ajax Render Media
+ +
+ public
+ ajax_render_media() : void
+
+ This method is responsible for providing the ajax response for the media uploader +preview.
+Inline Media Mixin Overrides Script
+ +
+ public
+ inline_media_mixin_overrides_script() : void
+
+ This method is responsible for outputting a script that makes a small override to the native
+WordPress wp.media.mixin.removeAllPlayers()
mixin. By default, WordPress kills all media
+elements when one is rendered in the WordPress media modal, with no way to ignore that behavior.
+The side effect of this is that media elements in the WP Admin are killed when selecting an audio
+or video attachment in the media uploader. Because WP Backstage uses WordPress media elements on
+audio and video previews in the media uploader fields, it is necessary to provide a way to ignore
+these in this function. This function was copied from /wp-includes/js/media-audiovideo.js
, and
+adds a simple check for a wp-mediaelement-keep
class to ignore removal.
Full rewrite of the media uploader script.
Renders previews via ajax instead of clone functionality.
+Adds styles for new media uploader preview rendering.
+Render Media Item
+ +
+ public
+ render_media_item(int $attachment_id[, bool $is_multiple = false ]) : void
+
+ This method is responsible for rendering a single media item for use in the media uploader +field. Taking into account whether the media uploader is rendering multiple items or not, +and then taking into account the mime type of the attachment, render a media element. If
+The ID of the attachment to render.
+Whether the media uploader allows multiple attachments or not.
+