videopress_editor_view_js_templates

WordPress Editor Views.

Description

videopress_editor_view_js_templates(); 

Usage

  1. if ( !function_exists( 'videopress_editor_view_js_templates' ) ) { 
  2. require_once '/modules/videopress/editor-media-view.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = videopress_editor_view_js_templates(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/videopress/editor-media-view.php  
  1. function videopress_editor_view_js_templates() { 
  2. /** 
  3. * This template uses the following parameters, and displays the video as an iframe: 
  4. * - data.guid // The guid of the video. 
  5. * - data.width // The width of the iframe. 
  6. * - data.height // The height of the iframe. 
  7. * - data.urlargs // Arguments serialized into a get string. 
  8. * In addition, the calling script will need to ensure that the following 
  9. * JS file is added to the header of the editor iframe: 
  10. * - https://s0.wp.com/wp-content/plugins/video/assets/js/next/videopress-iframe.js 
  11. */ 
  12. ?> 
  13. <script type="text/html" id="tmpl-videopress_iframe_vnext"> 
  14. <div class="tmpl-videopress_iframe_next" style="max-height:{{ data.height }}px;"> 
  15. <div class="videopress-editor-wrapper" style="padding-top:{{ data.ratio }}%;"> 
  16. <iframe style="display: block;" width="{{ data.width }}" height="{{ data.height }}" src="https://videopress.com/embed/{{ data.guid }}?{{ data.urlargs }}" frameborder='0' allowfullscreen></iframe> 
  17. </div> 
  18. </div> 
  19. </script> 
  20. <?php