cp_render_media_video_template()
Renders the template for the modal content for the media video widget
Return
(string)
Source
File: wp-includes/widgets/class-wp-widget-media-video.php
function cp_render_media_video_template() {
ob_start();
?>
<template id="tmpl-edit-video-modal">
<div id="video-modal-content" style="padding: 2em;">
<div class="modal-video-details">
<div class="video-embed" style="max-width:640px;">
<video class="wp_video_shortcode" controls="" style="width:100%;">
<source src="<?php echo esc_url( includes_url() . 'js/mediaelement/blank.mp4' ); ?>" type="video/mp4">
</video>
<div class="setting" style="margin-top: 1em;">
<label for="video-details-source" class="name">MP4</label>
<input type="text" id="video-details-source" readonly="" data-setting="mp4" value="" style="width:100%;">
</div>
<button type="button" class="button-link remove-setting" style="display:block;color: #a00; padding: 5px 0;"><?php esc_html_e( 'Remove video source' ); ?></button>
<fieldset class="setting-group setting preload" style="margin: 1em 0;display: flex;">
<label for="preload" class="name" style="margin: 6px 1em 0 0;"><?php esc_html_e( 'Preload' ); ?></label>
<select id="preload" name="link-type" data-setting="preload">
<option value="auto"><?php esc_html_e( 'Auto' ); ?></option>
<option value="metadata"><?php esc_html_e( 'Metadata' ); ?></option>
<option value="" selected><?php esc_html_e( 'None' ); ?></option>
</select>
</fieldset>
<div class="setting-group" style="margin: 1em 0;display: flex;">
<div class="setting checkbox-setting">
<input type="checkbox" id="video-details-loop" data-setting="loop">
<label for="video-details-loop" class="checkbox-label"><?php esc_html_e( 'Loop' ); ?></label>
</div>
</div>
<div class="setting" data-setting="content">
<span class="name"><?php esc_html_e( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ); ?></span><br>
<em><?php esc_html_e( 'There are no associated subtitles.' ); ?></em>
<textarea class="hidden content-setting"></textarea>
</div>
</div>
</div>
</div>
<footer class="widget-modal-footer">
<div class="widget-modal-footer-buttons" style="padding-right: 2em;">
<button id="video-button-update" type="button" class="button media-button button-primary button-large media-button-select" disabled><?php esc_html_e( 'Update' ); ?></button>
</div>
</footer>
</template>
<?php
return ob_get_clean();
}
Changelog
| Version | Description |
|---|---|
| CP-2.5.0 | Introduced. CP-2.5.0 |