[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> media-template.php (source)

   1  <?php
   2  /**
   3   * WordPress media templates.
   4   *
   5   * @package WordPress
   6   * @subpackage Media
   7   * @since 3.5.0
   8   */
   9  
  10  /**
  11   * Outputs the markup for a audio tag to be used in an Underscore template
  12   * when data.model is passed.
  13   *
  14   * @since 3.9.0
  15   */
  16  function wp_underscore_audio_template() {
  17      $audio_types = wp_get_audio_extensions();
  18      ?>
  19  <audio style="visibility: hidden"
  20      controls
  21      class="wp-audio-shortcode"
  22      width="{{ _.isUndefined( data.model.width ) ? 400 : data.model.width }}"
  23      preload="{{ _.isUndefined( data.model.preload ) ? 'none' : data.model.preload }}"
  24      <#
  25      <?php
  26      foreach ( array( 'autoplay', 'loop' ) as $attr ) :
  27          ?>
  28      if ( ! _.isUndefined( data.model.<?php echo $attr; ?> ) && data.model.<?php echo $attr; ?> ) {
  29          #> <?php echo $attr; ?><#
  30      }
  31      <?php endforeach; ?>#>
  32  >
  33      <# if ( ! _.isEmpty( data.model.src ) ) { #>
  34      <source src="{{ data.model.src }}" type="{{ wp.media.view.settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
  35      <# } #>
  36  
  37      <?php
  38      foreach ( $audio_types as $type ) :
  39          ?>
  40      <# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) { #>
  41      <source src="{{ data.model.<?php echo $type; ?> }}" type="{{ wp.media.view.settings.embedMimes[ '<?php echo $type; ?>' ] }}" />
  42      <# } #>
  43          <?php
  44      endforeach;
  45      ?>
  46  </audio>
  47      <?php
  48  }
  49  
  50  /**
  51   * Outputs the markup for a video tag to be used in an Underscore template
  52   * when data.model is passed.
  53   *
  54   * @since 3.9.0
  55   */
  56  function wp_underscore_video_template() {
  57      $video_types = wp_get_video_extensions();
  58      ?>
  59  <#  var w_rule = '', classes = [],
  60          w, h, settings = wp.media.view.settings,
  61          isYouTube = isVimeo = false;
  62  
  63      if ( ! _.isEmpty( data.model.src ) ) {
  64          isYouTube = data.model.src.match(/youtube|youtu\.be/);
  65          isVimeo = -1 !== data.model.src.indexOf('vimeo');
  66      }
  67  
  68      if ( settings.contentWidth && data.model.width >= settings.contentWidth ) {
  69          w = settings.contentWidth;
  70      } else {
  71          w = data.model.width;
  72      }
  73  
  74      if ( w !== data.model.width ) {
  75          h = Math.ceil( ( data.model.height * w ) / data.model.width );
  76      } else {
  77          h = data.model.height;
  78      }
  79  
  80      if ( w ) {
  81          w_rule = 'width: ' + w + 'px; ';
  82      }
  83  
  84      if ( isYouTube ) {
  85          classes.push( 'youtube-video' );
  86      }
  87  
  88      if ( isVimeo ) {
  89          classes.push( 'vimeo-video' );
  90      }
  91  
  92  #>
  93  <div style="{{ w_rule }}" class="wp-video">
  94  <video controls
  95      class="wp-video-shortcode {{ classes.join( ' ' ) }}"
  96      <# if ( w ) { #>width="{{ w }}"<# } #>
  97      <# if ( h ) { #>height="{{ h }}"<# } #>
  98      <?php
  99      $props = array(
 100          'poster'  => '',
 101          'preload' => 'metadata',
 102      );
 103      foreach ( $props as $key => $value ) :
 104          if ( empty( $value ) ) {
 105              ?>
 106          <#
 107          if ( ! _.isUndefined( data.model.<?php echo $key; ?> ) && data.model.<?php echo $key; ?> ) {
 108              #> <?php echo $key; ?>="{{ data.model.<?php echo $key; ?> }}"<#
 109          } #>
 110              <?php
 111          } else {
 112              echo $key
 113              ?>
 114              ="{{ _.isUndefined( data.model.<?php echo $key; ?> ) ? '<?php echo $value; ?>' : data.model.<?php echo $key; ?> }}"
 115              <?php
 116          }
 117      endforeach;
 118      ?>
 119      <#
 120      <?php
 121      foreach ( array( 'autoplay', 'loop' ) as $attr ) :
 122          ?>
 123      if ( ! _.isUndefined( data.model.<?php echo $attr; ?> ) && data.model.<?php echo $attr; ?> ) {
 124          #> <?php echo $attr; ?><#
 125      }
 126      <?php endforeach; ?>#>
 127  >
 128      <# if ( ! _.isEmpty( data.model.src ) ) {
 129          if ( isYouTube ) { #>
 130          <source src="{{ data.model.src }}" type="video/youtube" />
 131          <# } else if ( isVimeo ) { #>
 132          <source src="{{ data.model.src }}" type="video/vimeo" />
 133          <# } else { #>
 134          <source src="{{ data.model.src }}" type="{{ settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
 135          <# }
 136      } #>
 137  
 138      <?php
 139      foreach ( $video_types as $type ) :
 140          ?>
 141      <# if ( data.model.<?php echo $type; ?> ) { #>
 142      <source src="{{ data.model.<?php echo $type; ?> }}" type="{{ settings.embedMimes[ '<?php echo $type; ?>' ] }}" />
 143      <# } #>
 144      <?php endforeach; ?>
 145      {{{ data.model.content }}}
 146  </video>
 147  </div>
 148      <?php
 149  }
 150  
 151  /**
 152   * Prints the templates used in the media manager.
 153   *
 154   * @since 3.5.0
 155   */
 156  function wp_print_media_templates() {
 157      $class = 'media-modal wp-core-ui';
 158  
 159      $alt_text_description = sprintf(
 160          /* translators: 1: Link to tutorial, 2: Additional link attributes, 3: Accessibility text. */
 161          __( '<a href="%1$s" %2$s>Learn how to describe the purpose of the image%3$s</a>. Leave empty if the image is purely decorative.' ),
 162          esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ),
 163          'target="_blank" rel="noopener"',
 164          sprintf(
 165              '<span class="screen-reader-text"> %s</span>',
 166              /* translators: Accessibility text. */
 167              __( '(opens in a new tab)' )
 168          )
 169      );
 170      ?>
 171  
 172      <?php // Template for the media frame: used both in the media grid and in the media modal. ?>
 173      <script type="text/html" id="tmpl-media-frame">
 174          <div class="media-frame-title" id="media-frame-title"></div>
 175          <h2 class="media-frame-menu-heading"><?php _ex( 'Actions', 'media modal menu actions' ); ?></h2>
 176          <button type="button" class="button button-link media-frame-menu-toggle" aria-expanded="false">
 177              <?php _ex( 'Menu', 'media modal menu' ); ?>
 178              <span class="dashicons dashicons-arrow-down" aria-hidden="true"></span>
 179          </button>
 180          <div class="media-frame-menu"></div>
 181          <div class="media-frame-tab-panel">
 182              <div class="media-frame-router"></div>
 183              <div class="media-frame-content"></div>
 184          </div>
 185          <h2 class="media-frame-actions-heading screen-reader-text">
 186          <?php
 187              /* translators: Accessibility text. */
 188              _e( 'Selected media actions' );
 189          ?>
 190          </h2>
 191          <div class="media-frame-toolbar"></div>
 192          <div class="media-frame-uploader"></div>
 193      </script>
 194  
 195      <?php // Template for the media modal. ?>
 196      <script type="text/html" id="tmpl-media-modal">
 197          <div tabindex="0" class="<?php echo $class; ?>" role="dialog" aria-labelledby="media-frame-title">
 198              <# if ( data.hasCloseButton ) { #>
 199                  <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></span></button>
 200              <# } #>
 201              <div class="media-modal-content" role="document"></div>
 202          </div>
 203          <div class="media-modal-backdrop"></div>
 204      </script>
 205  
 206      <?php // Template for the window uploader, used for example in the media grid. ?>
 207      <script type="text/html" id="tmpl-uploader-window">
 208          <div class="uploader-window-content">
 209              <div class="uploader-editor-title"><?php _e( 'Drop files to upload' ); ?></div>
 210          </div>
 211      </script>
 212  
 213      <?php // Template for the editor uploader. ?>
 214      <script type="text/html" id="tmpl-uploader-editor">
 215          <div class="uploader-editor-content">
 216              <div class="uploader-editor-title"><?php _e( 'Drop files to upload' ); ?></div>
 217          </div>
 218      </script>
 219  
 220      <?php // Template for the inline uploader, used for example in the Media Library admin page - Add New. ?>
 221      <script type="text/html" id="tmpl-uploader-inline">
 222          <# var messageClass = data.message ? 'has-upload-message' : 'no-upload-message'; #>
 223          <# if ( data.canClose ) { #>
 224          <button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close uploader' ); ?></span></button>
 225          <# } #>
 226          <div class="uploader-inline-content {{ messageClass }}">
 227          <# if ( data.message ) { #>
 228              <h2 class="upload-message">{{ data.message }}</h2>
 229          <# } #>
 230          <?php if ( ! _device_can_upload() ) : ?>
 231              <div class="upload-ui">
 232                  <h2 class="upload-instructions"><?php _e( 'Your browser cannot upload files' ); ?></h2>
 233                  <p>
 234                  <?php
 235                      printf(
 236                          /* translators: %s: https://apps.wordpress.org/ */
 237                          __( 'The web browser on your device cannot be used to upload files. You may be able to use the <a href="%s">native app for your device</a> instead.' ),
 238                          'https://apps.wordpress.org/'
 239                      );
 240                  ?>
 241                  </p>
 242              </div>
 243          <?php elseif ( is_multisite() && ! is_upload_space_available() ) : ?>
 244              <div class="upload-ui">
 245                  <h2 class="upload-instructions"><?php _e( 'Upload Limit Exceeded' ); ?></h2>
 246                  <?php
 247                  /** This action is documented in wp-admin/includes/media.php */
 248                  do_action( 'upload_ui_over_quota' );
 249                  ?>
 250              </div>
 251          <?php else : ?>
 252              <div class="upload-ui">
 253                  <h2 class="upload-instructions drop-instructions"><?php _e( 'Drop files to upload' ); ?></h2>
 254                  <p class="upload-instructions drop-instructions"><?php _ex( 'or', 'Uploader: Drop files here - or - Select Files' ); ?></p>
 255                  <button type="button" class="browser button button-hero" aria-labelledby="post-upload-info"><?php _e( 'Select Files' ); ?></button>
 256              </div>
 257  
 258              <div class="upload-inline-status"></div>
 259  
 260              <div class="post-upload-ui" id="post-upload-info">
 261                  <?php
 262                  /** This action is documented in wp-admin/includes/media.php */
 263                  do_action( 'pre-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
 264                  /** This action is documented in wp-admin/includes/media.php */
 265                  do_action( 'pre-plupload-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
 266  
 267                  if ( 10 === remove_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' ) ) {
 268                      /** This action is documented in wp-admin/includes/media.php */
 269                      do_action( 'post-plupload-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
 270                      add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
 271                  } else {
 272                      /** This action is documented in wp-admin/includes/media.php */
 273                      do_action( 'post-plupload-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
 274                  }
 275  
 276                  $max_upload_size = wp_max_upload_size();
 277                  if ( ! $max_upload_size ) {
 278                      $max_upload_size = 0;
 279                  }
 280                  ?>
 281  
 282                  <p class="max-upload-size">
 283                  <?php
 284                      printf(
 285                          /* translators: %s: Maximum allowed file size. */
 286                          __( 'Maximum upload file size: %s.' ),
 287                          esc_html( size_format( $max_upload_size ) )
 288                      );
 289                  ?>
 290                  </p>
 291  
 292                  <# if ( data.suggestedWidth && data.suggestedHeight ) { #>
 293                      <p class="suggested-dimensions">
 294                          <?php
 295                              /* translators: 1: Suggested width number, 2: Suggested height number. */
 296                              printf( __( 'Suggested image dimensions: %1$s by %2$s pixels.' ), '{{data.suggestedWidth}}', '{{data.suggestedHeight}}' );
 297                          ?>
 298                      </p>
 299                  <# } #>
 300  
 301                  <?php
 302                  /** This action is documented in wp-admin/includes/media.php */
 303                  do_action( 'post-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
 304                  ?>
 305              </div>
 306          <?php endif; ?>
 307          </div>
 308      </script>
 309  
 310      <?php // Template for the view switchers, used for example in the Media Grid. ?>
 311      <script type="text/html" id="tmpl-media-library-view-switcher">
 312          <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', admin_url( 'upload.php' ) ) ); ?>" class="view-list">
 313              <span class="screen-reader-text"><?php _e( 'List view' ); ?></span>
 314          </a>
 315          <a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', admin_url( 'upload.php' ) ) ); ?>" class="view-grid current" aria-current="page">
 316              <span class="screen-reader-text"><?php _e( 'Grid view' ); ?></span>
 317          </a>
 318      </script>
 319  
 320      <?php // Template for the uploading status UI. ?>
 321      <script type="text/html" id="tmpl-uploader-status">
 322          <h2><?php _e( 'Uploading' ); ?></h2>
 323  
 324          <div class="media-progress-bar"><div></div></div>
 325          <div class="upload-details">
 326              <span class="upload-count">
 327                  <span class="upload-index"></span> / <span class="upload-total"></span>
 328              </span>
 329              <span class="upload-detail-separator">&ndash;</span>
 330              <span class="upload-filename"></span>
 331          </div>
 332          <div class="upload-errors"></div>
 333          <button type="button" class="button upload-dismiss-errors"><?php _e( 'Dismiss errors' ); ?></button>
 334      </script>
 335  
 336      <?php // Template for the uploading status errors. ?>
 337      <script type="text/html" id="tmpl-uploader-status-error">
 338          <span class="upload-error-filename">{{{ data.filename }}}</span>
 339          <span class="upload-error-message">{{ data.message }}</span>
 340      </script>
 341  
 342      <?php // Template for the Attachment Details layout in the media browser. ?>
 343      <script type="text/html" id="tmpl-edit-attachment-frame">
 344          <div class="edit-media-header">
 345              <button class="left dashicons"<# if ( ! data.hasPrevious ) { #> disabled<# } #>><span class="screen-reader-text"><?php _e( 'Edit previous media item' ); ?></span></button>
 346              <button class="right dashicons"<# if ( ! data.hasNext ) { #> disabled<# } #>><span class="screen-reader-text"><?php _e( 'Edit next media item' ); ?></span></button>
 347              <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></span></button>
 348          </div>
 349          <div class="media-frame-title"></div>
 350          <div class="media-frame-content"></div>
 351      </script>
 352  
 353      <?php // Template for the Attachment Details two columns layout. ?>
 354      <script type="text/html" id="tmpl-attachment-details-two-column">
 355          <div class="attachment-media-view {{ data.orientation }}">
 356              <h2 class="screen-reader-text"><?php _e( 'Attachment Preview' ); ?></h2>
 357              <div class="thumbnail thumbnail-{{ data.type }}">
 358                  <# if ( data.uploading ) { #>
 359                      <div class="media-progress-bar"><div></div></div>
 360                  <# } else if ( data.sizes && data.sizes.large ) { #>
 361                      <img class="details-image" src="{{ data.sizes.large.url }}" draggable="false" alt="" />
 362                  <# } else if ( data.sizes && data.sizes.full ) { #>
 363                      <img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" alt="" />
 364                  <# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #>
 365                      <img class="details-image icon" src="{{ data.icon }}" draggable="false" alt="" />
 366                  <# } #>
 367  
 368                  <# if ( 'audio' === data.type ) { #>
 369                  <div class="wp-media-wrapper wp-audio">
 370                      <audio style="visibility: hidden" controls class="wp-audio-shortcode" width="100%" preload="none">
 371                          <source type="{{ data.mime }}" src="{{ data.url }}" />
 372                      </audio>
 373                  </div>
 374                  <# } else if ( 'video' === data.type ) {
 375                      var w_rule = '';
 376                      if ( data.width ) {
 377                          w_rule = 'width: ' + data.width + 'px;';
 378                      } else if ( wp.media.view.settings.contentWidth ) {
 379                          w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;';
 380                      }
 381                  #>
 382                  <div style="{{ w_rule }}" class="wp-media-wrapper wp-video">
 383                      <video controls="controls" class="wp-video-shortcode" preload="metadata"
 384                          <# if ( data.width ) { #>width="{{ data.width }}"<# } #>
 385                          <# if ( data.height ) { #>height="{{ data.height }}"<# } #>
 386                          <# if ( data.image && data.image.src !== data.icon ) { #>poster="{{ data.image.src }}"<# } #>>
 387                          <source type="{{ data.mime }}" src="{{ data.url }}" />
 388                      </video>
 389                  </div>
 390                  <# } #>
 391  
 392                  <div class="attachment-actions">
 393                      <# if ( 'image' === data.type && ! data.uploading && data.sizes && data.can.save ) { #>
 394                      <button type="button" class="button edit-attachment"><?php _e( 'Edit Image' ); ?></button>
 395                      <# } else if ( 'pdf' === data.subtype && data.sizes ) { #>
 396                      <p><?php _e( 'Document Preview' ); ?></p>
 397                      <# } #>
 398                  </div>
 399              </div>
 400          </div>
 401          <div class="attachment-info">
 402              <span class="settings-save-status" role="status">
 403                  <span class="spinner"></span>
 404                  <span class="saved"><?php esc_html_e( 'Saved.' ); ?></span>
 405              </span>
 406              <div class="details">
 407                  <h2 class="screen-reader-text"><?php _e( 'Details' ); ?></h2>
 408                  <div class="uploaded"><strong><?php _e( 'Uploaded on:' ); ?></strong> {{ data.dateFormatted }}</div>
 409                  <div class="uploaded-by">
 410                      <strong><?php _e( 'Uploaded by:' ); ?></strong>
 411                          <# if ( data.authorLink ) { #>
 412                              <a href="{{ data.authorLink }}">{{ data.authorName }}</a>
 413                          <# } else { #>
 414                              {{ data.authorName }}
 415                          <# } #>
 416                  </div>
 417                  <# if ( data.uploadedToTitle ) { #>
 418                      <div class="uploaded-to">
 419                          <strong><?php _e( 'Uploaded to:' ); ?></strong>
 420                          <# if ( data.uploadedToLink ) { #>
 421                              <a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a>
 422                          <# } else { #>
 423                              {{ data.uploadedToTitle }}
 424                          <# } #>
 425                      </div>
 426                  <# } #>
 427                  <div class="filename"><strong><?php _e( 'File name:' ); ?></strong> {{ data.filename }}</div>
 428                  <div class="file-type"><strong><?php _e( 'File type:' ); ?></strong> {{ data.mime }}</div>
 429                  <div class="file-size"><strong><?php _e( 'File size:' ); ?></strong> {{ data.filesizeHumanReadable }}</div>
 430                  <# if ( 'image' === data.type && ! data.uploading ) { #>
 431                      <# if ( data.width && data.height ) { #>
 432                          <div class="dimensions"><strong><?php _e( 'Dimensions:' ); ?></strong>
 433                              <?php
 434                              /* translators: 1: A number of pixels wide, 2: A number of pixels tall. */
 435                              printf( __( '%1$s by %2$s pixels' ), '{{ data.width }}', '{{ data.height }}' );
 436                              ?>
 437                          </div>
 438                      <# } #>
 439  
 440                      <# if ( data.originalImageURL && data.originalImageName ) { #>
 441                          <div class="word-wrap-break-word">
 442                              <?php _e( 'Original image:' ); ?>
 443                              <a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a>
 444                          </div>
 445                      <# } #>
 446                  <# } #>
 447  
 448                  <# if ( data.fileLength && data.fileLengthHumanReadable ) { #>
 449                      <div class="file-length"><strong><?php _e( 'Length:' ); ?></strong>
 450                          <span aria-hidden="true">{{ data.fileLength }}</span>
 451                          <span class="screen-reader-text">{{ data.fileLengthHumanReadable }}</span>
 452                      </div>
 453                  <# } #>
 454  
 455                  <# if ( 'audio' === data.type && data.meta.bitrate ) { #>
 456                      <div class="bitrate">
 457                          <strong><?php _e( 'Bitrate:' ); ?></strong> {{ Math.round( data.meta.bitrate / 1000 ) }}kb/s
 458                          <# if ( data.meta.bitrate_mode ) { #>
 459                          {{ ' ' + data.meta.bitrate_mode.toUpperCase() }}
 460                          <# } #>
 461                      </div>
 462                  <# } #>
 463  
 464                  <# if ( data.mediaStates ) { #>
 465                      <div class="media-states"><strong><?php _e( 'Used as:' ); ?></strong> {{ data.mediaStates }}</div>
 466                  <# } #>
 467  
 468                  <div class="compat-meta">
 469                      <# if ( data.compat && data.compat.meta ) { #>
 470                          {{{ data.compat.meta }}}
 471                      <# } #>
 472                  </div>
 473              </div>
 474  
 475              <div class="settings">
 476                  <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
 477                  <# if ( 'image' === data.type ) { #>
 478                      <span class="setting alt-text has-description" data-setting="alt">
 479                          <label for="attachment-details-two-column-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label>
 480                          <textarea id="attachment-details-two-column-alt-text" aria-describedby="alt-text-description" {{ maybeReadOnly }}>{{ data.alt }}</textarea>
 481                      </span>
 482                      <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
 483                  <# } #>
 484                  <?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
 485                  <span class="setting" data-setting="title">
 486                      <label for="attachment-details-two-column-title" class="name"><?php _e( 'Title' ); ?></label>
 487                      <input type="text" id="attachment-details-two-column-title" value="{{ data.title }}" {{ maybeReadOnly }} />
 488                  </span>
 489                  <?php endif; ?>
 490                  <# if ( 'audio' === data.type ) { #>
 491                  <?php
 492                  foreach ( array(
 493                      'artist' => __( 'Artist' ),
 494                      'album'  => __( 'Album' ),
 495                  ) as $key => $label ) :
 496                      ?>
 497                  <span class="setting" data-setting="<?php echo esc_attr( $key ); ?>">
 498                      <label for="attachment-details-two-column-<?php echo esc_attr( $key ); ?>" class="name"><?php echo $label; ?></label>
 499                      <input type="text" id="attachment-details-two-column-<?php echo esc_attr( $key ); ?>" value="{{ data.<?php echo $key; ?> || data.meta.<?php echo $key; ?> || '' }}" />
 500                  </span>
 501                  <?php endforeach; ?>
 502                  <# } #>
 503                  <span class="setting" data-setting="caption">
 504                      <label for="attachment-details-two-column-caption" class="name"><?php _e( 'Caption' ); ?></label>
 505                      <textarea id="attachment-details-two-column-caption" {{ maybeReadOnly }}>{{ data.caption }}</textarea>
 506                  </span>
 507                  <span class="setting" data-setting="description">
 508                      <label for="attachment-details-two-column-description" class="name"><?php _e( 'Description' ); ?></label>
 509                      <textarea id="attachment-details-two-column-description" {{ maybeReadOnly }}>{{ data.description }}</textarea>
 510                  </span>
 511                  <span class="setting" data-setting="url">
 512                      <label for="attachment-details-two-column-copy-link" class="name"><?php _e( 'File URL:' ); ?></label>
 513                      <input type="text" class="attachment-details-copy-link" id="attachment-details-two-column-copy-link" value="{{ data.url }}" readonly />
 514                      <span class="copy-to-clipboard-container">
 515                          <button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-two-column-copy-link"><?php _e( 'Copy URL to clipboard' ); ?></button>
 516                          <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
 517                      </span>
 518                  </span>
 519                  <div class="attachment-compat"></div>
 520              </div>
 521  
 522              <div class="actions">
 523                  <# if ( data.link ) { #>
 524                      <a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a>
 525                  <# } #>
 526                  <# if ( data.can.save ) { #>
 527                      <# if ( data.link ) { #>
 528                          <span class="links-separator">|</span>
 529                      <# } #>
 530                      <a href="{{ data.editLink }}"><?php _e( 'Edit more details' ); ?></a>
 531                  <# } #>
 532                  <# if ( ! data.uploading && data.can.remove ) { #>
 533                      <# if ( data.link || data.can.save ) { #>
 534                          <span class="links-separator">|</span>
 535                      <# } #>
 536                      <?php if ( MEDIA_TRASH ) : ?>
 537                          <# if ( 'trash' === data.status ) { #>
 538                              <button type="button" class="button-link untrash-attachment"><?php _e( 'Restore from Trash' ); ?></button>
 539                          <# } else { #>
 540                              <button type="button" class="button-link trash-attachment"><?php _e( 'Move to Trash' ); ?></button>
 541                          <# } #>
 542                      <?php else : ?>
 543                          <button type="button" class="button-link delete-attachment"><?php _e( 'Delete permanently' ); ?></button>
 544                      <?php endif; ?>
 545                  <# } #>
 546              </div>
 547          </div>
 548      </script>
 549  
 550      <?php // Template for the Attachment "thumbnails" in the Media Grid. ?>
 551      <script type="text/html" id="tmpl-attachment">
 552          <div class="attachment-preview js--select-attachment type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}">
 553              <div class="thumbnail">
 554                  <# if ( data.uploading ) { #>
 555                      <div class="media-progress-bar"><div style="width: {{ data.percent }}%"></div></div>
 556                  <# } else if ( 'image' === data.type && data.size && data.size.url ) { #>
 557                      <div class="centered">
 558                          <img src="{{ data.size.url }}" draggable="false" alt="" />
 559                      </div>
 560                  <# } else { #>
 561                      <div class="centered">
 562                          <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
 563                              <img src="{{ data.image.src }}" class="thumbnail" draggable="false" alt="" />
 564                          <# } else if ( data.sizes && data.sizes.medium ) { #>
 565                              <img src="{{ data.sizes.medium.url }}" class="thumbnail" draggable="false" alt="" />
 566                          <# } else { #>
 567                              <img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
 568                          <# } #>
 569                      </div>
 570                      <div class="filename">
 571                          <div>{{ data.filename }}</div>
 572                      </div>
 573                  <# } #>
 574              </div>
 575              <# if ( data.buttons.close ) { #>
 576                  <button type="button" class="button-link attachment-close media-modal-icon"><span class="screen-reader-text"><?php _e( 'Remove' ); ?></span></button>
 577              <# } #>
 578          </div>
 579          <# if ( data.buttons.check ) { #>
 580              <button type="button" class="check" tabindex="-1"><span class="media-modal-icon"></span><span class="screen-reader-text"><?php _e( 'Deselect' ); ?></span></button>
 581          <# } #>
 582          <#
 583          var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly';
 584          if ( data.describe ) {
 585              if ( 'image' === data.type ) { #>
 586                  <input type="text" value="{{ data.caption }}" class="describe" data-setting="caption"
 587                      aria-label="<?php esc_attr_e( 'Caption' ); ?>"
 588                      placeholder="<?php esc_attr_e( 'Caption&hellip;' ); ?>" {{ maybeReadOnly }} />
 589              <# } else { #>
 590                  <input type="text" value="{{ data.title }}" class="describe" data-setting="title"
 591                      <# if ( 'video' === data.type ) { #>
 592                          aria-label="<?php esc_attr_e( 'Video title' ); ?>"
 593                          placeholder="<?php esc_attr_e( 'Video title&hellip;' ); ?>"
 594                      <# } else if ( 'audio' === data.type ) { #>
 595                          aria-label="<?php esc_attr_e( 'Audio title' ); ?>"
 596                          placeholder="<?php esc_attr_e( 'Audio title&hellip;' ); ?>"
 597                      <# } else { #>
 598                          aria-label="<?php esc_attr_e( 'Media title' ); ?>"
 599                          placeholder="<?php esc_attr_e( 'Media title&hellip;' ); ?>"
 600                      <# } #> {{ maybeReadOnly }} />
 601              <# }
 602          } #>
 603      </script>
 604  
 605      <?php // Template for the Attachment details, used for example in the sidebar. ?>
 606      <script type="text/html" id="tmpl-attachment-details">
 607          <h2>
 608              <?php _e( 'Attachment Details' ); ?>
 609              <span class="settings-save-status" role="status">
 610                  <span class="spinner"></span>
 611                  <span class="saved"><?php esc_html_e( 'Saved.' ); ?></span>
 612              </span>
 613          </h2>
 614          <div class="attachment-info">
 615  
 616              <# if ( 'audio' === data.type ) { #>
 617                  <div class="wp-media-wrapper wp-audio">
 618                      <audio style="visibility: hidden" controls class="wp-audio-shortcode" width="100%" preload="none">
 619                          <source type="{{ data.mime }}" src="{{ data.url }}" />
 620                      </audio>
 621                  </div>
 622              <# } else if ( 'video' === data.type ) {
 623                  var w_rule = '';
 624                  if ( data.width ) {
 625                      w_rule = 'width: ' + data.width + 'px;';
 626                  } else if ( wp.media.view.settings.contentWidth ) {
 627                      w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;';
 628                  }
 629              #>
 630                  <div style="{{ w_rule }}" class="wp-media-wrapper wp-video">
 631                      <video controls="controls" class="wp-video-shortcode" preload="metadata"
 632                          <# if ( data.width ) { #>width="{{ data.width }}"<# } #>
 633                          <# if ( data.height ) { #>height="{{ data.height }}"<# } #>
 634                          <# if ( data.image && data.image.src !== data.icon ) { #>poster="{{ data.image.src }}"<# } #>>
 635                          <source type="{{ data.mime }}" src="{{ data.url }}" />
 636                      </video>
 637                  </div>
 638              <# } else { #>
 639                  <div class="thumbnail thumbnail-{{ data.type }}">
 640                      <# if ( data.uploading ) { #>
 641                          <div class="media-progress-bar"><div></div></div>
 642                      <# } else if ( 'image' === data.type && data.size && data.size.url ) { #>
 643                          <img src="{{ data.size.url }}" draggable="false" alt="" />
 644                      <# } else { #>
 645                          <img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
 646                      <# } #>
 647                  </div>
 648              <# } #>
 649  
 650              <div class="details">
 651                  <div class="filename">{{ data.filename }}</div>
 652                  <div class="uploaded">{{ data.dateFormatted }}</div>
 653  
 654                  <div class="file-size">{{ data.filesizeHumanReadable }}</div>
 655                  <# if ( 'image' === data.type && ! data.uploading ) { #>
 656                      <# if ( data.width && data.height ) { #>
 657                          <div class="dimensions">
 658                              <?php
 659                              /* translators: 1: A number of pixels wide, 2: A number of pixels tall. */
 660                              printf( __( '%1$s by %2$s pixels' ), '{{ data.width }}', '{{ data.height }}' );
 661                              ?>
 662                          </div>
 663                      <# } #>
 664  
 665                      <# if ( data.originalImageURL && data.originalImageName ) { #>
 666                          <div class="word-wrap-break-word">
 667                              <?php _e( 'Original image:' ); ?>
 668                              <a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a>
 669                          </div>
 670                      <# } #>
 671  
 672                      <# if ( data.can.save && data.sizes ) { #>
 673                          <a class="edit-attachment" href="{{ data.editLink }}&amp;image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a>
 674                      <# } #>
 675                  <# } #>
 676  
 677                  <# if ( data.fileLength && data.fileLengthHumanReadable ) { #>
 678                      <div class="file-length"><?php _e( 'Length:' ); ?>
 679                          <span aria-hidden="true">{{ data.fileLength }}</span>
 680                          <span class="screen-reader-text">{{ data.fileLengthHumanReadable }}</span>
 681                      </div>
 682                  <# } #>
 683  
 684                  <# if ( data.mediaStates ) { #>
 685                      <div class="media-states"><strong><?php _e( 'Used as:' ); ?></strong> {{ data.mediaStates }}</div>
 686                  <# } #>
 687  
 688                  <# if ( ! data.uploading && data.can.remove ) { #>
 689                      <?php if ( MEDIA_TRASH ) : ?>
 690                      <# if ( 'trash' === data.status ) { #>
 691                          <button type="button" class="button-link untrash-attachment"><?php _e( 'Restore from Trash' ); ?></button>
 692                      <# } else { #>
 693                          <button type="button" class="button-link trash-attachment"><?php _e( 'Move to Trash' ); ?></button>
 694                      <# } #>
 695                      <?php else : ?>
 696                          <button type="button" class="button-link delete-attachment"><?php _e( 'Delete permanently' ); ?></button>
 697                      <?php endif; ?>
 698                  <# } #>
 699  
 700                  <div class="compat-meta">
 701                      <# if ( data.compat && data.compat.meta ) { #>
 702                          {{{ data.compat.meta }}}
 703                      <# } #>
 704                  </div>
 705              </div>
 706          </div>
 707          <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
 708          <# if ( 'image' === data.type ) { #>
 709              <span class="setting alt-text has-description" data-setting="alt">
 710                  <label for="attachment-details-alt-text" class="name"><?php _e( 'Alt Text' ); ?></label>
 711                  <textarea id="attachment-details-alt-text" aria-describedby="alt-text-description" {{ maybeReadOnly }}>{{ data.alt }}</textarea>
 712              </span>
 713              <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
 714          <# } #>
 715          <?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
 716          <span class="setting" data-setting="title">
 717              <label for="attachment-details-title" class="name"><?php _e( 'Title' ); ?></label>
 718              <input type="text" id="attachment-details-title" value="{{ data.title }}" {{ maybeReadOnly }} />
 719          </span>
 720          <?php endif; ?>
 721          <# if ( 'audio' === data.type ) { #>
 722          <?php
 723          foreach ( array(
 724              'artist' => __( 'Artist' ),
 725              'album'  => __( 'Album' ),
 726          ) as $key => $label ) :
 727              ?>
 728          <span class="setting" data-setting="<?php echo esc_attr( $key ); ?>">
 729              <label for="attachment-details-<?php echo esc_attr( $key ); ?>" class="name"><?php echo $label; ?></label>
 730              <input type="text" id="attachment-details-<?php echo esc_attr( $key ); ?>" value="{{ data.<?php echo $key; ?> || data.meta.<?php echo $key; ?> || '' }}" />
 731          </span>
 732          <?php endforeach; ?>
 733          <# } #>
 734          <span class="setting" data-setting="caption">
 735              <label for="attachment-details-caption" class="name"><?php _e( 'Caption' ); ?></label>
 736              <textarea id="attachment-details-caption" {{ maybeReadOnly }}>{{ data.caption }}</textarea>
 737          </span>
 738          <span class="setting" data-setting="description">
 739              <label for="attachment-details-description" class="name"><?php _e( 'Description' ); ?></label>
 740              <textarea id="attachment-details-description" {{ maybeReadOnly }}>{{ data.description }}</textarea>
 741          </span>
 742          <span class="setting" data-setting="url">
 743              <label for="attachment-details-copy-link" class="name"><?php _e( 'File URL:' ); ?></label>
 744              <input type="text" class="attachment-details-copy-link" id="attachment-details-copy-link" value="{{ data.url }}" readonly />
 745              <div class="copy-to-clipboard-container">
 746                  <button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-copy-link"><?php _e( 'Copy URL to clipboard' ); ?></button>
 747                  <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
 748              </div>
 749          </span>
 750      </script>
 751  
 752      <?php // Template for the Selection status bar. ?>
 753      <script type="text/html" id="tmpl-media-selection">
 754          <div class="selection-info">
 755              <span class="count"></span>
 756              <# if ( data.editable ) { #>
 757                  <button type="button" class="button-link edit-selection"><?php _e( 'Edit Selection' ); ?></button>
 758              <# } #>
 759              <# if ( data.clearable ) { #>
 760                  <button type="button" class="button-link clear-selection"><?php _e( 'Clear' ); ?></button>
 761              <# } #>
 762          </div>
 763          <div class="selection-view"></div>
 764      </script>
 765  
 766      <?php // Template for the Attachment display settings, used for example in the sidebar. ?>
 767      <script type="text/html" id="tmpl-attachment-display-settings">
 768          <h2><?php _e( 'Attachment Display Settings' ); ?></h2>
 769  
 770          <# if ( 'image' === data.type ) { #>
 771              <span class="setting align">
 772                  <label for="attachment-display-settings-alignment" class="name"><?php _e( 'Alignment' ); ?></label>
 773                  <select id="attachment-display-settings-alignment" class="alignment"
 774                      data-setting="align"
 775                      <# if ( data.userSettings ) { #>
 776                          data-user-setting="align"
 777                      <# } #>>
 778  
 779                      <option value="left">
 780                          <?php esc_html_e( 'Left' ); ?>
 781                      </option>
 782                      <option value="center">
 783                          <?php esc_html_e( 'Center' ); ?>
 784                      </option>
 785                      <option value="right">
 786                          <?php esc_html_e( 'Right' ); ?>
 787                      </option>
 788                      <option value="none" selected>
 789                          <?php esc_html_e( 'None' ); ?>
 790                      </option>
 791                  </select>
 792              </span>
 793          <# } #>
 794  
 795          <span class="setting">
 796              <label for="attachment-display-settings-link-to" class="name">
 797                  <# if ( data.model.canEmbed ) { #>
 798                      <?php _e( 'Embed or Link' ); ?>
 799                  <# } else { #>
 800                      <?php _e( 'Link To' ); ?>
 801                  <# } #>
 802              </label>
 803              <select id="attachment-display-settings-link-to" class="link-to"
 804                  data-setting="link"
 805                  <# if ( data.userSettings && ! data.model.canEmbed ) { #>
 806                      data-user-setting="urlbutton"
 807                  <# } #>>
 808  
 809              <# if ( data.model.canEmbed ) { #>
 810                  <option value="embed" selected>
 811                      <?php esc_html_e( 'Embed Media Player' ); ?>
 812                  </option>
 813                  <option value="file">
 814              <# } else { #>
 815                  <option value="none" selected>
 816                      <?php esc_html_e( 'None' ); ?>
 817                  </option>
 818                  <option value="file">
 819              <# } #>
 820                  <# if ( data.model.canEmbed ) { #>
 821                      <?php esc_html_e( 'Link to Media File' ); ?>
 822                  <# } else { #>
 823                      <?php esc_html_e( 'Media File' ); ?>
 824                  <# } #>
 825                  </option>
 826                  <option value="post">
 827                  <# if ( data.model.canEmbed ) { #>
 828                      <?php esc_html_e( 'Link to Attachment Page' ); ?>
 829                  <# } else { #>
 830                      <?php esc_html_e( 'Attachment Page' ); ?>
 831                  <# } #>
 832                  </option>
 833              <# if ( 'image' === data.type ) { #>
 834                  <option value="custom">
 835                      <?php esc_html_e( 'Custom URL' ); ?>
 836                  </option>
 837              <# } #>
 838              </select>
 839          </span>
 840          <span class="setting">
 841              <label for="attachment-display-settings-link-to-custom" class="name"><?php _e( 'URL' ); ?></label>
 842              <input type="text" id="attachment-display-settings-link-to-custom" class="link-to-custom" data-setting="linkUrl" />
 843          </span>
 844  
 845          <# if ( 'undefined' !== typeof data.sizes ) { #>
 846              <span class="setting">
 847                  <label for="attachment-display-settings-size" class="name"><?php _e( 'Size' ); ?></label>
 848                  <select id="attachment-display-settings-size" class="size" name="size"
 849                      data-setting="size"
 850                      <# if ( data.userSettings ) { #>
 851                          data-user-setting="imgsize"
 852                      <# } #>>
 853                      <?php
 854                      /** This filter is documented in wp-admin/includes/media.php */
 855                      $sizes = apply_filters(
 856                          'image_size_names_choose',
 857                          array(
 858                              'thumbnail' => __( 'Thumbnail' ),
 859                              'medium'    => __( 'Medium' ),
 860                              'large'     => __( 'Large' ),
 861                              'full'      => __( 'Full Size' ),
 862                          )
 863                      );
 864  
 865                      foreach ( $sizes as $value => $name ) :
 866                          ?>
 867                          <#
 868                          var size = data.sizes['<?php echo esc_js( $value ); ?>'];
 869                          if ( size ) { #>
 870                              <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'full' ); ?>>
 871                                  <?php echo esc_html( $name ); ?> &ndash; {{ size.width }} &times; {{ size.height }}
 872                              </option>
 873                          <# } #>
 874                      <?php endforeach; ?>
 875                  </select>
 876              </span>
 877          <# } #>
 878      </script>
 879  
 880      <?php // Template for the Gallery settings, used for example in the sidebar. ?>
 881      <script type="text/html" id="tmpl-gallery-settings">
 882          <h2><?php _e( 'Gallery Settings' ); ?></h2>
 883  
 884          <span class="setting">
 885              <label for="gallery-settings-link-to" class="name"><?php _e( 'Link To' ); ?></label>
 886              <select id="gallery-settings-link-to" class="link-to"
 887                  data-setting="link"
 888                  <# if ( data.userSettings ) { #>
 889                      data-user-setting="urlbutton"
 890                  <# } #>>
 891  
 892                  <option value="post" <# if ( ! wp.media.galleryDefaults.link || 'post' === wp.media.galleryDefaults.link ) {
 893                      #>selected="selected"<# }
 894                  #>>
 895                      <?php esc_html_e( 'Attachment Page' ); ?>
 896                  </option>
 897                  <option value="file" <# if ( 'file' === wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
 898                      <?php esc_html_e( 'Media File' ); ?>
 899                  </option>
 900                  <option value="none" <# if ( 'none' === wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
 901                      <?php esc_html_e( 'None' ); ?>
 902                  </option>
 903              </select>
 904          </span>
 905  
 906          <span class="setting">
 907              <label for="gallery-settings-columns" class="name select-label-inline"><?php _e( 'Columns' ); ?></label>
 908              <select id="gallery-settings-columns" class="columns" name="columns"
 909                  data-setting="columns">
 910                  <?php for ( $i = 1; $i <= 9; $i++ ) : ?>
 911                      <option value="<?php echo esc_attr( $i ); ?>" <#
 912                          if ( <?php echo $i; ?> == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
 913                      #>>
 914                          <?php echo esc_html( $i ); ?>
 915                      </option>
 916                  <?php endfor; ?>
 917              </select>
 918          </span>
 919  
 920          <span class="setting">
 921              <input type="checkbox" id="gallery-settings-random-order" data-setting="_orderbyRandom" />
 922              <label for="gallery-settings-random-order" class="checkbox-label-inline"><?php _e( 'Random Order' ); ?></label>
 923          </span>
 924  
 925          <span class="setting size">
 926              <label for="gallery-settings-size" class="name"><?php _e( 'Size' ); ?></label>
 927              <select id="gallery-settings-size" class="size" name="size"
 928                  data-setting="size"
 929                  <# if ( data.userSettings ) { #>
 930                      data-user-setting="imgsize"
 931                  <# } #>
 932                  >
 933                  <?php
 934                  /** This filter is documented in wp-admin/includes/media.php */
 935                  $size_names = apply_filters(
 936                      'image_size_names_choose',
 937                      array(
 938                          'thumbnail' => __( 'Thumbnail' ),
 939                          'medium'    => __( 'Medium' ),
 940                          'large'     => __( 'Large' ),
 941                          'full'      => __( 'Full Size' ),
 942                      )
 943                  );
 944  
 945                  foreach ( $size_names as $size => $label ) :
 946                      ?>
 947                      <option value="<?php echo esc_attr( $size ); ?>">
 948                          <?php echo esc_html( $label ); ?>
 949                      </option>
 950                  <?php endforeach; ?>
 951              </select>
 952          </span>
 953      </script>
 954  
 955      <?php // Template for the Playlists settings, used for example in the sidebar. ?>
 956      <script type="text/html" id="tmpl-playlist-settings">
 957          <h2><?php _e( 'Playlist Settings' ); ?></h2>
 958  
 959          <# var emptyModel = _.isEmpty( data.model ),
 960              isVideo = 'video' === data.controller.get('library').props.get('type'); #>
 961  
 962          <span class="setting">
 963              <input type="checkbox" id="playlist-settings-show-list" data-setting="tracklist" <# if ( emptyModel ) { #>
 964                  checked="checked"
 965              <# } #> />
 966              <label for="playlist-settings-show-list" class="checkbox-label-inline">
 967                  <# if ( isVideo ) { #>
 968                  <?php _e( 'Show Video List' ); ?>
 969                  <# } else { #>
 970                  <?php _e( 'Show Tracklist' ); ?>
 971                  <# } #>
 972              </label>
 973          </span>
 974  
 975          <# if ( ! isVideo ) { #>
 976          <span class="setting">
 977              <input type="checkbox" id="playlist-settings-show-artist" data-setting="artists" <# if ( emptyModel ) { #>
 978                  checked="checked"
 979              <# } #> />
 980              <label for="playlist-settings-show-artist" class="checkbox-label-inline">
 981                  <?php _e( 'Show Artist Name in Tracklist' ); ?>
 982              </label>
 983          </span>
 984          <# } #>
 985  
 986          <span class="setting">
 987              <input type="checkbox" id="playlist-settings-show-images" data-setting="images" <# if ( emptyModel ) { #>
 988                  checked="checked"
 989              <# } #> />
 990              <label for="playlist-settings-show-images" class="checkbox-label-inline">
 991                  <?php _e( 'Show Images' ); ?>
 992              </label>
 993          </span>
 994      </script>
 995  
 996      <?php // Template for the "Insert from URL" layout. ?>
 997      <script type="text/html" id="tmpl-embed-link-settings">
 998          <span class="setting link-text">
 999              <label for="embed-link-settings-link-text" class="name"><?php _e( 'Link Text' ); ?></label>
1000              <input type="text" id="embed-link-settings-link-text" class="alignment" data-setting="linkText" />
1001          </span>
1002          <div class="embed-container" style="display: none;">
1003              <div class="embed-preview"></div>
1004          </div>
1005      </script>
1006  
1007      <?php // Template for the "Insert from URL" image preview and details. ?>
1008      <script type="text/html" id="tmpl-embed-image-settings">
1009          <div class="wp-clearfix">
1010              <div class="thumbnail">
1011                  <img src="{{ data.model.url }}" draggable="false" alt="" />
1012              </div>
1013          </div>
1014  
1015          <span class="setting alt-text has-description">
1016              <label for="embed-image-settings-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label>
1017              <textarea id="embed-image-settings-alt-text" data-setting="alt" aria-describedby="alt-text-description"></textarea>
1018          </span>
1019          <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
1020  
1021          <?php
1022          /** This filter is documented in wp-admin/includes/media.php */
1023          if ( ! apply_filters( 'disable_captions', '' ) ) :
1024              ?>
1025              <span class="setting caption">
1026                  <label for="embed-image-settings-caption" class="name"><?php _e( 'Caption' ); ?></label>
1027                  <textarea id="embed-image-settings-caption" data-setting="caption"></textarea>
1028              </span>
1029          <?php endif; ?>
1030  
1031          <fieldset class="setting-group">
1032              <legend class="name"><?php _e( 'Align' ); ?></legend>
1033              <span class="setting align">
1034                  <span class="button-group button-large" data-setting="align">
1035                      <button class="button" value="left">
1036                          <?php esc_html_e( 'Left' ); ?>
1037                      </button>
1038                      <button class="button" value="center">
1039                          <?php esc_html_e( 'Center' ); ?>
1040                      </button>
1041                      <button class="button" value="right">
1042                          <?php esc_html_e( 'Right' ); ?>
1043                      </button>
1044                      <button class="button active" value="none">
1045                          <?php esc_html_e( 'None' ); ?>
1046                      </button>
1047                  </span>
1048              </span>
1049          </fieldset>
1050  
1051          <fieldset class="setting-group">
1052              <legend class="name"><?php _e( 'Link To' ); ?></legend>
1053              <span class="setting link-to">
1054                  <span class="button-group button-large" data-setting="link">
1055                      <button class="button" value="file">
1056                          <?php esc_html_e( 'Image URL' ); ?>
1057                      </button>
1058                      <button class="button" value="custom">
1059                          <?php esc_html_e( 'Custom URL' ); ?>
1060                      </button>
1061                      <button class="button active" value="none">
1062                          <?php esc_html_e( 'None' ); ?>
1063                      </button>
1064                  </span>
1065              </span>
1066              <span class="setting">
1067                  <label for="embed-image-settings-link-to-custom" class="name"><?php _e( 'URL' ); ?></label>
1068                  <input type="text" id="embed-image-settings-link-to-custom" class="link-to-custom" data-setting="linkUrl" />
1069              </span>
1070          </fieldset>
1071      </script>
1072  
1073      <?php // Template for the Image details, used for example in the editor. ?>
1074      <script type="text/html" id="tmpl-image-details">
1075          <div class="media-embed">
1076              <div class="embed-media-settings">
1077                  <div class="column-settings">
1078                      <span class="setting alt-text has-description">
1079                          <label for="image-details-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label>
1080                          <textarea id="image-details-alt-text" data-setting="alt" aria-describedby="alt-text-description">{{ data.model.alt }}</textarea>
1081                      </span>
1082                      <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
1083  
1084                      <?php
1085                      /** This filter is documented in wp-admin/includes/media.php */
1086                      if ( ! apply_filters( 'disable_captions', '' ) ) :
1087                          ?>
1088                          <span class="setting caption">
1089                              <label for="image-details-caption" class="name"><?php _e( 'Caption' ); ?></label>
1090                              <textarea id="image-details-caption" data-setting="caption">{{ data.model.caption }}</textarea>
1091                          </span>
1092                      <?php endif; ?>
1093  
1094                      <h2><?php _e( 'Display Settings' ); ?></h2>
1095                      <fieldset class="setting-group">
1096                          <legend class="legend-inline"><?php _e( 'Align' ); ?></legend>
1097                          <span class="setting align">
1098                              <span class="button-group button-large" data-setting="align">
1099                                  <button class="button" value="left">
1100                                      <?php esc_html_e( 'Left' ); ?>
1101                                  </button>
1102                                  <button class="button" value="center">
1103                                      <?php esc_html_e( 'Center' ); ?>
1104                                  </button>
1105                                  <button class="button" value="right">
1106                                      <?php esc_html_e( 'Right' ); ?>
1107                                  </button>
1108                                  <button class="button active" value="none">
1109                                      <?php esc_html_e( 'None' ); ?>
1110                                  </button>
1111                              </span>
1112                          </span>
1113                      </fieldset>
1114  
1115                      <# if ( data.attachment ) { #>
1116                          <# if ( 'undefined' !== typeof data.attachment.sizes ) { #>
1117                              <span class="setting size">
1118                                  <label for="image-details-size" class="name"><?php _e( 'Size' ); ?></label>
1119                                  <select id="image-details-size" class="size" name="size"
1120                                      data-setting="size"
1121                                      <# if ( data.userSettings ) { #>
1122                                          data-user-setting="imgsize"
1123                                      <# } #>>
1124                                      <?php
1125                                      /** This filter is documented in wp-admin/includes/media.php */
1126                                      $sizes = apply_filters(
1127                                          'image_size_names_choose',
1128                                          array(
1129                                              'thumbnail' => __( 'Thumbnail' ),
1130                                              'medium'    => __( 'Medium' ),
1131                                              'large'     => __( 'Large' ),
1132                                              'full'      => __( 'Full Size' ),
1133                                          )
1134                                      );
1135  
1136                                      foreach ( $sizes as $value => $name ) :
1137                                          ?>
1138                                          <#
1139                                          var size = data.sizes['<?php echo esc_js( $value ); ?>'];
1140                                          if ( size ) { #>
1141                                              <option value="<?php echo esc_attr( $value ); ?>">
1142                                                  <?php echo esc_html( $name ); ?> &ndash; {{ size.width }} &times; {{ size.height }}
1143                                              </option>
1144                                          <# } #>
1145                                      <?php endforeach; ?>
1146                                      <option value="<?php echo esc_attr( 'custom' ); ?>">
1147                                          <?php _e( 'Custom Size' ); ?>
1148                                      </option>
1149                                  </select>
1150                              </span>
1151                          <# } #>
1152                              <div class="custom-size wp-clearfix<# if ( data.model.size !== 'custom' ) { #> hidden<# } #>">
1153                                  <span class="custom-size-setting">
1154                                      <label for="image-details-size-width"><?php _e( 'Width' ); ?></label>
1155                                      <input type="number" id="image-details-size-width" aria-describedby="image-size-desc" data-setting="customWidth" step="1" value="{{ data.model.customWidth }}" />
1156                                  </span>
1157                                  <span class="sep" aria-hidden="true">&times;</span>
1158                                  <span class="custom-size-setting">
1159                                      <label for="image-details-size-height"><?php _e( 'Height' ); ?></label>
1160                                      <input type="number" id="image-details-size-height" aria-describedby="image-size-desc" data-setting="customHeight" step="1" value="{{ data.model.customHeight }}" />
1161                                  </span>
1162                                  <p id="image-size-desc" class="description"><?php _e( 'Image size in pixels' ); ?></p>
1163                              </div>
1164                      <# } #>
1165  
1166                      <span class="setting link-to">
1167                          <label for="image-details-link-to" class="name"><?php _e( 'Link To' ); ?></label>
1168                          <select id="image-details-link-to" data-setting="link">
1169                          <# if ( data.attachment ) { #>
1170                              <option value="file">
1171                                  <?php esc_html_e( 'Media File' ); ?>
1172                              </option>
1173                              <option value="post">
1174                                  <?php esc_html_e( 'Attachment Page' ); ?>
1175                              </option>
1176                          <# } else { #>
1177                              <option value="file">
1178                                  <?php esc_html_e( 'Image URL' ); ?>
1179                              </option>
1180                          <# } #>
1181                              <option value="custom">
1182                                  <?php esc_html_e( 'Custom URL' ); ?>
1183                              </option>
1184                              <option value="none">
1185                                  <?php esc_html_e( 'None' ); ?>
1186                              </option>
1187                          </select>
1188                      </span>
1189                      <span class="setting">
1190                          <label for="image-details-link-to-custom" class="name"><?php _e( 'URL' ); ?></label>
1191                          <input type="text" id="image-details-link-to-custom" class="link-to-custom" data-setting="linkUrl" />
1192                      </span>
1193  
1194                      <div class="advanced-section">
1195                          <h2><button type="button" class="button-link advanced-toggle"><?php _e( 'Advanced Options' ); ?></button></h2>
1196                          <div class="advanced-settings hidden">
1197                              <div class="advanced-image">
1198                                  <span class="setting title-text">
1199                                      <label for="image-details-title-attribute" class="name"><?php _e( 'Image Title Attribute' ); ?></label>
1200                                      <input type="text" id="image-details-title-attribute" data-setting="title" value="{{ data.model.title }}" />
1201                                  </span>
1202                                  <span class="setting extra-classes">
1203                                      <label for="image-details-css-class" class="name"><?php _e( 'Image CSS Class' ); ?></label>
1204                                      <input type="text" id="image-details-css-class" data-setting="extraClasses" value="{{ data.model.extraClasses }}" />
1205                                  </span>
1206                              </div>
1207                              <div class="advanced-link">
1208                                  <span class="setting link-target">
1209                                      <input type="checkbox" id="image-details-link-target" data-setting="linkTargetBlank" value="_blank" <# if ( data.model.linkTargetBlank ) { #>checked="checked"<# } #>>
1210                                      <label for="image-details-link-target" class="checkbox-label"><?php _e( 'Open link in a new tab' ); ?></label>
1211                                  </span>
1212                                  <span class="setting link-rel">
1213                                      <label for="image-details-link-rel" class="name"><?php _e( 'Link Rel' ); ?></label>
1214                                      <input type="text" id="image-details-link-rel" data-setting="linkRel" value="{{ data.model.linkRel }}" />
1215                                  </span>
1216                                  <span class="setting link-class-name">
1217                                      <label for="image-details-link-css-class" class="name"><?php _e( 'Link CSS Class' ); ?></label>
1218                                      <input type="text" id="image-details-link-css-class" data-setting="linkClassName" value="{{ data.model.linkClassName }}" />
1219                                  </span>
1220                              </div>
1221                          </div>
1222                      </div>
1223                  </div>
1224                  <div class="column-image">
1225                      <div class="image">
1226                          <img src="{{ data.model.url }}" draggable="false" alt="" />
1227                          <# if ( data.attachment && window.imageEdit ) { #>
1228                              <div class="actions">
1229                                  <input type="button" class="edit-attachment button" value="<?php esc_attr_e( 'Edit Original' ); ?>" />
1230                                  <input type="button" class="replace-attachment button" value="<?php esc_attr_e( 'Replace' ); ?>" />
1231                              </div>
1232                          <# } #>
1233                      </div>
1234                  </div>
1235              </div>
1236          </div>
1237      </script>
1238  
1239      <?php // Template for the Image Editor layout. ?>
1240      <script type="text/html" id="tmpl-image-editor">
1241          <div id="media-head-{{ data.id }}"></div>
1242          <div id="image-editor-{{ data.id }}"></div>
1243      </script>
1244  
1245      <?php // Template for an embedded Audio details. ?>
1246      <script type="text/html" id="tmpl-audio-details">
1247          <# var ext, html5types = {
1248              mp3: wp.media.view.settings.embedMimes.mp3,
1249              ogg: wp.media.view.settings.embedMimes.ogg
1250          }; #>
1251  
1252          <?php $audio_types = wp_get_audio_extensions(); ?>
1253          <div class="media-embed media-embed-details">
1254              <div class="embed-media-settings embed-audio-settings">
1255                  <?php wp_underscore_audio_template(); ?>
1256  
1257                  <# if ( ! _.isEmpty( data.model.src ) ) {
1258                      ext = data.model.src.split('.').pop();
1259                      if ( html5types[ ext ] ) {
1260                          delete html5types[ ext ];
1261                      }
1262                  #>
1263                  <span class="setting">
1264                      <label for="audio-details-source" class="name"><?php _e( 'URL' ); ?></label>
1265                      <input type="text" id="audio-details-source" readonly data-setting="src" value="{{ data.model.src }}" />
1266                      <button type="button" class="button-link remove-setting"><?php _e( 'Remove audio source' ); ?></button>
1267                  </span>
1268                  <# } #>
1269                  <?php
1270  
1271                  foreach ( $audio_types as $type ) :
1272                      ?>
1273                  <# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) {
1274                      if ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) {
1275                          delete html5types.<?php echo $type; ?>;
1276                      }
1277                  #>
1278                  <span class="setting">
1279                      <label for="audio-details-<?php echo $type . '-source'; ?>" class="name"><?php echo strtoupper( $type ); ?></label>
1280                      <input type="text" id="audio-details-<?php echo $type . '-source'; ?>" readonly data-setting="<?php echo $type; ?>" value="{{ data.model.<?php echo $type; ?> }}" />
1281                      <button type="button" class="button-link remove-setting"><?php _e( 'Remove audio source' ); ?></button>
1282                  </span>
1283                  <# } #>
1284                  <?php endforeach; ?>
1285  
1286                  <# if ( ! _.isEmpty( html5types ) ) { #>
1287                  <fieldset class="setting-group">
1288                      <legend class="name"><?php _e( 'Add alternate sources for maximum HTML5 playback' ); ?></legend>
1289                      <span class="setting">
1290                          <span class="button-large">
1291                          <# _.each( html5types, function (mime, type) { #>
1292                              <button class="button add-media-source" data-mime="{{ mime }}">{{ type }}</button>
1293                          <# } ) #>
1294                          </span>
1295                      </span>
1296                  </fieldset>
1297                  <# } #>
1298  
1299                  <fieldset class="setting-group">
1300                      <legend class="name"><?php _e( 'Preload' ); ?></legend>
1301                      <span class="setting preload">
1302                          <span class="button-group button-large" data-setting="preload">
1303                              <button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button>
1304                              <button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button>
1305                              <button class="button active" value="none"><?php _e( 'None' ); ?></button>
1306                          </span>
1307                      </span>
1308                  </fieldset>
1309  
1310                  <span class="setting-group">
1311                      <span class="setting checkbox-setting autoplay">
1312                          <input type="checkbox" id="audio-details-autoplay" data-setting="autoplay" />
1313                          <label for="audio-details-autoplay" class="checkbox-label"><?php _e( 'Autoplay' ); ?></label>
1314                      </span>
1315  
1316                      <span class="setting checkbox-setting">
1317                          <input type="checkbox" id="audio-details-loop" data-setting="loop" />
1318                          <label for="audio-details-loop" class="checkbox-label"><?php _e( 'Loop' ); ?></label>
1319                      </span>
1320                  </span>
1321              </div>
1322          </div>
1323      </script>
1324  
1325      <?php // Template for an embedded Video details. ?>
1326      <script type="text/html" id="tmpl-video-details">
1327          <# var ext, html5types = {
1328              mp4: wp.media.view.settings.embedMimes.mp4,
1329              ogv: wp.media.view.settings.embedMimes.ogv,
1330              webm: wp.media.view.settings.embedMimes.webm
1331          }; #>
1332  
1333          <?php $video_types = wp_get_video_extensions(); ?>
1334          <div class="media-embed media-embed-details">
1335              <div class="embed-media-settings embed-video-settings">
1336                  <div class="wp-video-holder">
1337                  <#
1338                  var w = ! data.model.width || data.model.width > 640 ? 640 : data.model.width,
1339                      h = ! data.model.height ? 360 : data.model.height;
1340  
1341                  if ( data.model.width && w !== data.model.width ) {
1342                      h = Math.ceil( ( h * w ) / data.model.width );
1343                  }
1344                  #>
1345  
1346                  <?php wp_underscore_video_template(); ?>
1347  
1348                  <# if ( ! _.isEmpty( data.model.src ) ) {
1349                      ext = data.model.src.split('.').pop();
1350                      if ( html5types[ ext ] ) {
1351                          delete html5types[ ext ];
1352                      }
1353                  #>
1354                  <span class="setting">
1355                      <label for="video-details-source" class="name"><?php _e( 'URL' ); ?></label>
1356                      <input type="text" id="video-details-source" readonly data-setting="src" value="{{ data.model.src }}" />
1357                      <button type="button" class="button-link remove-setting"><?php _e( 'Remove video source' ); ?></button>
1358                  </span>
1359                  <# } #>
1360                  <?php
1361                  foreach ( $video_types as $type ) :
1362                      ?>
1363                  <# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) {
1364                      if ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) {
1365                          delete html5types.<?php echo $type; ?>;
1366                      }
1367                  #>
1368                  <span class="setting">
1369                      <label for="video-details-<?php echo $type . '-source'; ?>" class="name"><?php echo strtoupper( $type ); ?></label>
1370                      <input type="text" id="video-details-<?php echo $type . '-source'; ?>" readonly data-setting="<?php echo $type; ?>" value="{{ data.model.<?php echo $type; ?> }}" />
1371                      <button type="button" class="button-link remove-setting"><?php _e( 'Remove video source' ); ?></button>
1372                  </span>
1373                  <# } #>
1374                  <?php endforeach; ?>
1375                  </div>
1376  
1377                  <# if ( ! _.isEmpty( html5types ) ) { #>
1378                  <fieldset class="setting-group">
1379                      <legend class="name"><?php _e( 'Add alternate sources for maximum HTML5 playback' ); ?></legend>
1380                      <span class="setting">
1381                          <span class="button-large">
1382                          <# _.each( html5types, function (mime, type) { #>
1383                              <button class="button add-media-source" data-mime="{{ mime }}">{{ type }}</button>
1384                          <# } ) #>
1385                          </span>
1386                      </span>
1387                  </fieldset>
1388                  <# } #>
1389  
1390                  <# if ( ! _.isEmpty( data.model.poster ) ) { #>
1391                  <span class="setting">
1392                      <label for="video-details-poster-image" class="name"><?php _e( 'Poster Image' ); ?></label>
1393                      <input type="text" id="video-details-poster-image" readonly data-setting="poster" value="{{ data.model.poster }}" />
1394                      <button type="button" class="button-link remove-setting"><?php _e( 'Remove poster image' ); ?></button>
1395                  </span>
1396                  <# } #>
1397  
1398                  <fieldset class="setting-group">
1399                      <legend class="name"><?php _e( 'Preload' ); ?></legend>
1400                      <span class="setting preload">
1401                          <span class="button-group button-large" data-setting="preload">
1402                              <button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button>
1403                              <button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button>
1404                              <button class="button active" value="none"><?php _e( 'None' ); ?></button>
1405                          </span>
1406                      </span>
1407                  </fieldset>
1408  
1409                  <span class="setting-group">
1410                      <span class="setting checkbox-setting autoplay">
1411                          <input type="checkbox" id="video-details-autoplay" data-setting="autoplay" />
1412                          <label for="video-details-autoplay" class="checkbox-label"><?php _e( 'Autoplay' ); ?></label>
1413                      </span>
1414  
1415                      <span class="setting checkbox-setting">
1416                          <input type="checkbox" id="video-details-loop" data-setting="loop" />
1417                          <label for="video-details-loop" class="checkbox-label"><?php _e( 'Loop' ); ?></label>
1418                      </span>
1419                  </span>
1420  
1421                  <span class="setting" data-setting="content">
1422                      <#
1423                      var content = '';
1424                      if ( ! _.isEmpty( data.model.content ) ) {
1425                          var tracks = jQuery( data.model.content ).filter( 'track' );
1426                          _.each( tracks.toArray(), function( track, index ) {
1427                              content += track.outerHTML; #>
1428                          <label for="video-details-track-{{ index }}" class="name"><?php _e( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ); ?></label>
1429                          <input class="content-track" type="text" id="video-details-track-{{ index }}" aria-describedby="video-details-track-desc-{{ index }}" value="{{ track.outerHTML }}" />
1430                          <span class="description" id="video-details-track-desc-{{ index }}">
1431                          <?php
1432                              printf(
1433                                  /* translators: 1: "srclang" HTML attribute, 2: "label" HTML attribute, 3: "kind" HTML attribute. */
1434                                  __( 'The %1$s, %2$s, and %3$s values can be edited to set the video track language and kind.' ),
1435                                  'srclang',
1436                                  'label',
1437                                  'kind'
1438                              );
1439                          ?>
1440                          </span>
1441                          <button type="button" class="button-link remove-setting remove-track"><?php _ex( 'Remove video track', 'media' ); ?></button><br />
1442                          <# } ); #>
1443                      <# } else { #>
1444                      <span class="name"><?php _e( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ); ?></span><br />
1445                      <em><?php _e( 'There are no associated subtitles.' ); ?></em>
1446                      <# } #>
1447                      <textarea class="hidden content-setting">{{ content }}</textarea>
1448                  </span>
1449              </div>
1450          </div>
1451      </script>
1452  
1453      <?php // Template for a Gallery within the editor. ?>
1454      <script type="text/html" id="tmpl-editor-gallery">
1455          <# if ( data.attachments.length ) { #>
1456              <div class="gallery gallery-columns-{{ data.columns }}">
1457                  <# _.each( data.attachments, function( attachment, index ) { #>
1458                      <dl class="gallery-item">
1459                          <dt class="gallery-icon">
1460                              <# if ( attachment.thumbnail ) { #>
1461                                  <img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="{{ attachment.alt }}" />
1462                              <# } else { #>
1463                                  <img src="{{ attachment.url }}" alt="{{ attachment.alt }}" />
1464                              <# } #>
1465                          </dt>
1466                          <# if ( attachment.caption ) { #>
1467                              <dd class="wp-caption-text gallery-caption">
1468                                  {{{ data.verifyHTML( attachment.caption ) }}}
1469                              </dd>
1470                          <# } #>
1471                      </dl>
1472                      <# if ( index % data.columns === data.columns - 1 ) { #>
1473                          <br style="clear: both;" />
1474                      <# } #>
1475                  <# } ); #>
1476              </div>
1477          <# } else { #>
1478              <div class="wpview-error">
1479                  <div class="dashicons dashicons-format-gallery"></div><p><?php _e( 'No items found.' ); ?></p>
1480              </div>
1481          <# } #>
1482      </script>
1483  
1484      <?php // Template for the Crop area layout, used for example in the Customizer. ?>
1485      <script type="text/html" id="tmpl-crop-content">
1486          <img class="crop-image" src="{{ data.url }}" alt="<?php esc_attr_e( 'Image crop area preview. Requires mouse interaction.' ); ?>" />
1487          <div class="upload-errors"></div>
1488      </script>
1489  
1490      <?php // Template for the Site Icon preview, used for example in the Customizer. ?>
1491      <script type="text/html" id="tmpl-site-icon-preview">
1492          <h2><?php _e( 'Preview' ); ?></h2>
1493          <strong aria-hidden="true"><?php _e( 'As a browser icon' ); ?></strong>
1494          <div class="favicon-preview">
1495              <img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" height="" alt="" />
1496  
1497              <div class="favicon">
1498                  <img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>" />
1499              </div>
1500              <span class="browser-title" aria-hidden="true"><# print( '<?php bloginfo( 'name' ); ?>' ) #></span>
1501          </div>
1502  
1503          <strong aria-hidden="true"><?php _e( 'As an app icon' ); ?></strong>
1504          <div class="app-icon-preview">
1505              <img id="preview-app-icon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>" />
1506          </div>
1507      </script>
1508  
1509      <?php
1510  
1511      /**
1512       * Fires when the custom Backbone media templates are printed.
1513       *
1514       * @since 3.5.0
1515       */
1516      do_action( 'print_media_templates' );
1517  }


Generated : Fri Sep 30 08:20:01 2022 Cross-referenced by PHPXref