Changeset 42343 for trunk/src/wp-includes/media-template.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/media-template.php (modified) (45 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media-template.php
r41325 r42343 23 23 preload="{{ _.isUndefined( data.model.preload ) ? 'none' : data.model.preload }}" 24 24 <# 25 <?php foreach ( array( 'autoplay', 'loop' ) as $attr ): 26 ?>if ( ! _.isUndefined( data.model.<?php echo $attr ?> ) && data.model.<?php echo $attr ?> ) { 27 #> <?php echo $attr ?><# 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; ?><# 28 30 } 29 31 <?php endforeach ?>#> … … 33 35 <# } #> 34 36 35 <?php foreach ( $audio_types as $type ): 36 ?><# if ( ! _.isEmpty( data.model.<?php echo $type ?> ) ) { #> 37 <source src="{{ data.model.<?php echo $type ?> }}" type="{{ wp.media.view.settings.embedMimes[ '<?php echo $type ?>' ] }}" /> 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; ?>' ] }}" /> 38 42 <# } #> 39 <?php endforeach; 40 ?></audio> 43 <?php 44 endforeach; 45 ?> 46 </audio> 41 47 <?php 42 48 } … … 70 76 } else { 71 77 h = data.model.height; 72 }78 } 73 79 74 80 if ( w ) { … … 91 97 <# if ( h ) { #>height="{{ h }}"<# } #> 92 98 <?php 93 $props = array( 'poster' => '', 'preload' => 'metadata' ); 94 foreach ( $props as $key => $value ): 99 $props = array( 100 'poster' => '', 101 'preload' => 'metadata', 102 ); 103 foreach ( $props as $key => $value ) : 95 104 if ( empty( $value ) ) { 96 ?><# 97 if ( ! _.isUndefined( data.model.<?php echo $key ?> ) && data.model.<?php echo $key ?> ) { 98 #> <?php echo $key ?>="{{ data.model.<?php echo $key ?> }}"<# 105 ?> 106 <# 107 if ( ! _.isUndefined( data.model.<?php echo $key; ?> ) && data.model.<?php echo $key; ?> ) { 108 #> <?php echo $key; ?>="{{ data.model.<?php echo $key; ?> }}"<# 99 109 } #> 100 <?php } else { 101 echo $key ?>="{{ _.isUndefined( data.model.<?php echo $key ?> ) ? '<?php echo $value ?>' : data.model.<?php echo $key ?> }}"<?php 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 102 116 } 103 117 endforeach; 104 ?><# 105 <?php foreach ( array( 'autoplay', 'loop' ) as $attr ): 106 ?> if ( ! _.isUndefined( data.model.<?php echo $attr ?> ) && data.model.<?php echo $attr ?> ) { 107 #> <?php echo $attr ?><# 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; ?><# 108 125 } 109 126 <?php endforeach ?>#> … … 119 136 } #> 120 137 121 <?php foreach ( $video_types as $type ): 122 ?><# if ( data.model.<?php echo $type ?> ) { #> 123 <source src="{{ data.model.<?php echo $type ?> }}" type="{{ settings.embedMimes[ '<?php echo $type ?>' ] }}" /> 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; ?>' ] }}" /> 124 143 <# } #> 125 144 <?php endforeach; ?> … … 140 159 global $is_IE; 141 160 $class = 'media-modal wp-core-ui'; 142 if ( $is_IE && strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false )161 if ( $is_IE && strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) !== false ) { 143 162 $class .= ' ie7'; 163 } 144 164 ?> 145 165 <!--[if lte IE 8]> … … 197 217 <?php 198 218 /** This action is documented in wp-admin/includes/media.php */ 199 do_action( 'upload_ui_over_quota' ); ?> 219 do_action( 'upload_ui_over_quota' ); 220 ?> 200 221 201 222 <?php else : ?> … … 230 251 ?> 231 252 232 <p class="max-upload-size"><?php 253 <p class="max-upload-size"> 254 <?php 233 255 printf( __( 'Maximum upload file size: %s.' ), esc_html( size_format( $max_upload_size ) ) ); 234 ?></p> 256 ?> 257 </p> 235 258 236 259 <# if ( data.suggestedWidth && data.suggestedHeight ) { #> … … 245 268 <?php 246 269 /** This action is documented in wp-admin/includes/media.php */ 247 do_action( 'post-upload-ui' ); ?> 270 do_action( 'post-upload-ui' ); 271 ?> 248 272 </div> 249 273 <?php endif; ?> … … 252 276 253 277 <script type="text/html" id="tmpl-media-library-view-switcher"> 254 <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ) ?>" class="view-list">278 <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-list"> 255 279 <span class="screen-reader-text"><?php _e( 'List View' ); ?></span> 256 280 </a> 257 <a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ) ?>" class="view-grid current">281 <a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-grid current"> 258 282 <span class="screen-reader-text"><?php _e( 'Grid View' ); ?></span> 259 283 </a> … … 338 362 <span class="settings-save-status"> 339 363 <span class="spinner"></span> 340 <span class="saved"><?php esc_html_e( 'Saved.'); ?></span>364 <span class="saved"><?php esc_html_e( 'Saved.' ); ?></span> 341 365 </span> 342 366 <div class="details"> … … 374 398 <div class="settings"> 375 399 <label class="setting" data-setting="url"> 376 <span class="name"><?php _e( 'URL'); ?></span>400 <span class="name"><?php _e( 'URL' ); ?></span> 377 401 <input type="text" value="{{ data.url }}" readonly /> 378 402 </label> … … 380 404 <?php if ( post_type_supports( 'attachment', 'title' ) ) : ?> 381 405 <label class="setting" data-setting="title"> 382 <span class="name"><?php _e( 'Title'); ?></span>406 <span class="name"><?php _e( 'Title' ); ?></span> 383 407 <input type="text" value="{{ data.title }}" {{ maybeReadOnly }} /> 384 408 </label> 385 409 <?php endif; ?> 386 410 <# if ( 'audio' === data.type ) { #> 387 <?php foreach ( array( 411 <?php 412 foreach ( array( 388 413 'artist' => __( 'Artist' ), 389 'album' => __( 'Album' ), 390 ) as $key => $label ) : ?> 391 <label class="setting" data-setting="<?php echo esc_attr( $key ) ?>"> 392 <span class="name"><?php echo $label ?></span> 393 <input type="text" value="{{ data.<?php echo $key ?> || data.meta.<?php echo $key ?> || '' }}" /> 414 'album' => __( 'Album' ), 415 ) as $key => $label ) : 416 ?> 417 <label class="setting" data-setting="<?php echo esc_attr( $key ); ?>"> 418 <span class="name"><?php echo $label; ?></span> 419 <input type="text" value="{{ data.<?php echo $key; ?> || data.meta.<?php echo $key; ?> || '' }}" /> 394 420 </label> 395 421 <?php endforeach; ?> … … 406 432 <# } #> 407 433 <label class="setting" data-setting="description"> 408 <span class="name"><?php _e( 'Description'); ?></span>434 <span class="name"><?php _e( 'Description' ); ?></span> 409 435 <textarea {{ maybeReadOnly }}>{{ data.description }}</textarea> 410 436 </label> … … 432 458 <# } #> 433 459 <# if ( ! data.uploading && data.can.remove ) { #> | 434 <?php if ( MEDIA_TRASH ) : ?>460 <?php if ( MEDIA_TRASH ) : ?> 435 461 <# if ( 'trash' === data.status ) { #> 436 462 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button> … … 438 464 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button> 439 465 <# } #> 440 <?php else : ?>466 <?php else : ?> 441 467 <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button> 442 468 <?php endif; ?> … … 483 509 if ( 'image' === data.type ) { #> 484 510 <input type="text" value="{{ data.caption }}" class="describe" data-setting="caption" 485 placeholder="<?php esc_attr_e( 'Caption this image…'); ?>" {{ maybeReadOnly }} />511 placeholder="<?php esc_attr_e( 'Caption this image…' ); ?>" {{ maybeReadOnly }} /> 486 512 <# } else { #> 487 513 <input type="text" value="{{ data.title }}" class="describe" data-setting="title" 488 514 <# if ( 'video' === data.type ) { #> 489 placeholder="<?php esc_attr_e( 'Describe this video…'); ?>"515 placeholder="<?php esc_attr_e( 'Describe this video…' ); ?>" 490 516 <# } else if ( 'audio' === data.type ) { #> 491 placeholder="<?php esc_attr_e( 'Describe this audio file…'); ?>"517 placeholder="<?php esc_attr_e( 'Describe this audio file…' ); ?>" 492 518 <# } else { #> 493 placeholder="<?php esc_attr_e( 'Describe this media file…'); ?>"519 placeholder="<?php esc_attr_e( 'Describe this media file…' ); ?>" 494 520 <# } #> {{ maybeReadOnly }} /> 495 521 <# } … … 502 528 <span class="settings-save-status"> 503 529 <span class="spinner"></span> 504 <span class="saved"><?php esc_html_e( 'Saved.'); ?></span>530 <span class="saved"><?php esc_html_e( 'Saved.' ); ?></span> 505 531 </span> 506 532 </h2> … … 535 561 536 562 <# if ( ! data.uploading && data.can.remove ) { #> 537 <?php if ( MEDIA_TRASH ) : ?>563 <?php if ( MEDIA_TRASH ) : ?> 538 564 <# if ( 'trash' === data.status ) { #> 539 565 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button> … … 541 567 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button> 542 568 <# } #> 543 <?php else : ?>569 <?php else : ?> 544 570 <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button> 545 571 <?php endif; ?> … … 555 581 556 582 <label class="setting" data-setting="url"> 557 <span class="name"><?php _e( 'URL'); ?></span>583 <span class="name"><?php _e( 'URL' ); ?></span> 558 584 <input type="text" value="{{ data.url }}" readonly /> 559 585 </label> … … 561 587 <?php if ( post_type_supports( 'attachment', 'title' ) ) : ?> 562 588 <label class="setting" data-setting="title"> 563 <span class="name"><?php _e( 'Title'); ?></span>589 <span class="name"><?php _e( 'Title' ); ?></span> 564 590 <input type="text" value="{{ data.title }}" {{ maybeReadOnly }} /> 565 591 </label> 566 592 <?php endif; ?> 567 593 <# if ( 'audio' === data.type ) { #> 568 <?php foreach ( array( 594 <?php 595 foreach ( array( 569 596 'artist' => __( 'Artist' ), 570 'album' => __( 'Album' ), 571 ) as $key => $label ) : ?> 572 <label class="setting" data-setting="<?php echo esc_attr( $key ) ?>"> 573 <span class="name"><?php echo $label ?></span> 574 <input type="text" value="{{ data.<?php echo $key ?> || data.meta.<?php echo $key ?> || '' }}" /> 597 'album' => __( 'Album' ), 598 ) as $key => $label ) : 599 ?> 600 <label class="setting" data-setting="<?php echo esc_attr( $key ); ?>"> 601 <span class="name"><?php echo $label; ?></span> 602 <input type="text" value="{{ data.<?php echo $key; ?> || data.meta.<?php echo $key; ?> || '' }}" /> 575 603 </label> 576 604 <?php endforeach; ?> 577 605 <# } #> 578 606 <label class="setting" data-setting="caption"> 579 <span class="name"><?php _e( 'Caption'); ?></span>607 <span class="name"><?php _e( 'Caption' ); ?></span> 580 608 <textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea> 581 609 </label> 582 610 <# if ( 'image' === data.type ) { #> 583 611 <label class="setting" data-setting="alt"> 584 <span class="name"><?php _e( 'Alt Text'); ?></span>612 <span class="name"><?php _e( 'Alt Text' ); ?></span> 585 613 <input type="text" value="{{ data.alt }}" {{ maybeReadOnly }} /> 586 614 </label> 587 615 <# } #> 588 616 <label class="setting" data-setting="description"> 589 <span class="name"><?php _e( 'Description'); ?></span>617 <span class="name"><?php _e( 'Description' ); ?></span> 590 618 <textarea {{ maybeReadOnly }}>{{ data.description }}</textarea> 591 619 </label> … … 610 638 <# if ( 'image' === data.type ) { #> 611 639 <label class="setting align"> 612 <span><?php _e( 'Alignment'); ?></span>640 <span><?php _e( 'Alignment' ); ?></span> 613 641 <select class="alignment" 614 642 data-setting="align" … … 636 664 <label> 637 665 <# if ( data.model.canEmbed ) { #> 638 <span><?php _e( 'Embed or Link'); ?></span>666 <span><?php _e( 'Embed or Link' ); ?></span> 639 667 <# } else { #> 640 <span><?php _e( 'Link To'); ?></span>668 <span><?php _e( 'Link To' ); ?></span> 641 669 <# } #> 642 670 … … 683 711 <# if ( 'undefined' !== typeof data.sizes ) { #> 684 712 <label class="setting"> 685 <span><?php _e( 'Size'); ?></span>713 <span><?php _e( 'Size' ); ?></span> 686 714 <select class="size" name="size" 687 715 data-setting="size" … … 691 719 <?php 692 720 /** This filter is documented in wp-admin/includes/media.php */ 693 $sizes = apply_filters( 'image_size_names_choose', array( 694 'thumbnail' => __('Thumbnail'), 695 'medium' => __('Medium'), 696 'large' => __('Large'), 697 'full' => __('Full Size'), 698 ) ); 699 700 foreach ( $sizes as $value => $name ) : ?> 721 $sizes = apply_filters( 722 'image_size_names_choose', array( 723 'thumbnail' => __( 'Thumbnail' ), 724 'medium' => __( 'Medium' ), 725 'large' => __( 'Large' ), 726 'full' => __( 'Full Size' ), 727 ) 728 ); 729 730 foreach ( $sizes as $value => $name ) : 731 ?> 701 732 <# 702 733 var size = data.sizes['<?php echo esc_js( $value ); ?>']; … … 716 747 717 748 <label class="setting"> 718 <span><?php _e( 'Link To'); ?></span>749 <span><?php _e( 'Link To' ); ?></span> 719 750 <select class="link-to" 720 751 data-setting="link" … … 738 769 739 770 <label class="setting"> 740 <span><?php _e( 'Columns'); ?></span>771 <span><?php _e( 'Columns' ); ?></span> 741 772 <select class="columns" name="columns" 742 773 data-setting="columns"> 743 774 <?php for ( $i = 1; $i <= 9; $i++ ) : ?> 744 775 <option value="<?php echo esc_attr( $i ); ?>" <# 745 if ( <?php echo $i ?> == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }776 if ( <?php echo $i; ?> == wp.media.galleryDefaults.columns ) { #>selected="selected"<# } 746 777 #>> 747 778 <?php echo esc_html( $i ); ?> … … 766 797 <?php 767 798 /** This filter is documented in wp-admin/includes/media.php */ 768 $size_names = apply_filters( 'image_size_names_choose', array( 769 'thumbnail' => __( 'Thumbnail' ), 770 'medium' => __( 'Medium' ), 771 'large' => __( 'Large' ), 772 'full' => __( 'Full Size' ), 773 ) ); 774 775 foreach ( $size_names as $size => $label ) : ?> 799 $size_names = apply_filters( 800 'image_size_names_choose', array( 801 'thumbnail' => __( 'Thumbnail' ), 802 'medium' => __( 'Medium' ), 803 'large' => __( 'Large' ), 804 'full' => __( 'Full Size' ), 805 ) 806 ); 807 808 foreach ( $size_names as $size => $label ) : 809 ?> 776 810 <option value="<?php echo esc_attr( $size ); ?>"> 777 811 <?php echo esc_html( $label ); ?> … … 833 867 <?php 834 868 /** This filter is documented in wp-admin/includes/media.php */ 835 if ( ! apply_filters( 'disable_captions', '' ) ) : ?> 869 if ( ! apply_filters( 'disable_captions', '' ) ) : 870 ?> 836 871 <label class="setting caption"> 837 <span><?php _e( 'Caption'); ?></span>872 <span><?php _e( 'Caption' ); ?></span> 838 873 <textarea data-setting="caption" /> 839 874 </label> … … 841 876 842 877 <label class="setting alt-text"> 843 <span><?php _e( 'Alt Text'); ?></span>878 <span><?php _e( 'Alt Text' ); ?></span> 844 879 <input type="text" data-setting="alt" /> 845 880 </label> 846 881 847 882 <div class="setting align"> 848 <span><?php _e( 'Align'); ?></span>883 <span><?php _e( 'Align' ); ?></span> 849 884 <div class="button-group button-large" data-setting="align"> 850 885 <button class="button" value="left"> … … 864 899 865 900 <div class="setting link-to"> 866 <span><?php _e( 'Link To'); ?></span>901 <span><?php _e( 'Link To' ); ?></span> 867 902 <div class="button-group button-large" data-setting="link"> 868 903 <button class="button" value="file"> … … 898 933 <?php 899 934 /** This filter is documented in wp-admin/includes/media.php */ 900 if ( ! apply_filters( 'disable_captions', '' ) ) : ?> 935 if ( ! apply_filters( 'disable_captions', '' ) ) : 936 ?> 901 937 <label class="setting caption"> 902 <span><?php _e( 'Caption'); ?></span>938 <span><?php _e( 'Caption' ); ?></span> 903 939 <textarea data-setting="caption">{{ data.model.caption }}</textarea> 904 940 </label> … … 906 942 907 943 <label class="setting alt-text"> 908 <span><?php _e( 'Alternative Text'); ?></span>944 <span><?php _e( 'Alternative Text' ); ?></span> 909 945 <input type="text" data-setting="alt" value="{{ data.model.alt }}" /> 910 946 </label> … … 912 948 <h2><?php _e( 'Display Settings' ); ?></h2> 913 949 <div class="setting align"> 914 <span><?php _e( 'Align'); ?></span>950 <span><?php _e( 'Align' ); ?></span> 915 951 <div class="button-group button-large" data-setting="align"> 916 952 <button class="button" value="left"> … … 932 968 <# if ( 'undefined' !== typeof data.attachment.sizes ) { #> 933 969 <label class="setting size"> 934 <span><?php _e( 'Size'); ?></span>970 <span><?php _e( 'Size' ); ?></span> 935 971 <select class="size" name="size" 936 972 data-setting="size" … … 940 976 <?php 941 977 /** This filter is documented in wp-admin/includes/media.php */ 942 $sizes = apply_filters( 'image_size_names_choose', array( 943 'thumbnail' => __('Thumbnail'), 944 'medium' => __('Medium'), 945 'large' => __('Large'), 946 'full' => __('Full Size'), 947 ) ); 948 949 foreach ( $sizes as $value => $name ) : ?> 978 $sizes = apply_filters( 979 'image_size_names_choose', array( 980 'thumbnail' => __( 'Thumbnail' ), 981 'medium' => __( 'Medium' ), 982 'large' => __( 'Large' ), 983 'full' => __( 'Full Size' ), 984 ) 985 ); 986 987 foreach ( $sizes as $value => $name ) : 988 ?> 950 989 <# 951 990 var size = data.sizes['<?php echo esc_js( $value ); ?>']; … … 968 1007 969 1008 <div class="setting link-to"> 970 <span><?php _e( 'Link To'); ?></span>1009 <span><?php _e( 'Link To' ); ?></span> 971 1010 <select data-setting="link"> 972 1011 <# if ( data.attachment ) { #> … … 996 1035 <div class="advanced-image"> 997 1036 <label class="setting title-text"> 998 <span><?php _e( 'Image Title Attribute'); ?></span>1037 <span><?php _e( 'Image Title Attribute' ); ?></span> 999 1038 <input type="text" data-setting="title" value="{{ data.model.title }}" /> 1000 1039 </label> 1001 1040 <label class="setting extra-classes"> 1002 <span><?php _e( 'Image CSS Class'); ?></span>1041 <span><?php _e( 'Image CSS Class' ); ?></span> 1003 1042 <input type="text" data-setting="extraClasses" value="{{ data.model.extraClasses }}" /> 1004 1043 </label> … … 1009 1048 </div> 1010 1049 <label class="setting link-rel"> 1011 <span><?php _e( 'Link Rel'); ?></span>1050 <span><?php _e( 'Link Rel' ); ?></span> 1012 1051 <input type="text" data-setting="linkRel" value="{{ data.model.linkRel }}" /> 1013 1052 </label> 1014 1053 <label class="setting link-class-name"> 1015 <span><?php _e( 'Link CSS Class'); ?></span>1054 <span><?php _e( 'Link CSS Class' ); ?></span> 1016 1055 <input type="text" data-setting="linkClassName" value="{{ data.model.linkClassName }}" /> 1017 1056 </label> … … 1038 1077 <div class="media-embed media-embed-details"> 1039 1078 <div class="embed-media-settings embed-audio-settings"> 1040 <?php wp_underscore_audio_template() ?>1079 <?php wp_underscore_audio_template(); ?> 1041 1080 1042 1081 <# if ( ! _.isEmpty( data.model.src ) ) { … … 1054 1093 <?php 1055 1094 1056 foreach ( $audio_types as $type ): 1057 ?><# if ( ! _.isEmpty( data.model.<?php echo $type ?> ) ) { 1058 if ( ! _.isUndefined( html5types.<?php echo $type ?> ) ) { 1059 delete html5types.<?php echo $type ?>; 1095 foreach ( $audio_types as $type ) : 1096 ?> 1097 <# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) { 1098 if ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) { 1099 delete html5types.<?php echo $type; ?>; 1060 1100 } 1061 1101 #> 1062 1102 <label class="setting"> 1063 <span><?php echo strtoupper( $type ) ?></span>1064 <input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type?> }}" />1103 <span><?php echo strtoupper( $type ); ?></span> 1104 <input type="text" disabled="disabled" data-setting="<?php echo $type; ?>" value="{{ data.model.<?php echo $type; ?> }}" /> 1065 1105 <button type="button" class="button-link remove-setting"><?php _e( 'Remove audio source' ); ?></button> 1066 1106 </label> … … 1070 1110 <# if ( ! _.isEmpty( html5types ) ) { #> 1071 1111 <div class="setting"> 1072 <span><?php _e( 'Add alternate sources for maximum HTML5 playback:' ) ?></span>1112 <span><?php _e( 'Add alternate sources for maximum HTML5 playback:' ); ?></span> 1073 1113 <div class="button-large"> 1074 1114 <# _.each( html5types, function (mime, type) { #> … … 1121 1161 #> 1122 1162 1123 <?php wp_underscore_video_template() ?>1163 <?php wp_underscore_video_template(); ?> 1124 1164 1125 1165 <# if ( ! _.isEmpty( data.model.src ) ) { … … 1135 1175 </label> 1136 1176 <# } #> 1137 <?php foreach ( $video_types as $type ): 1138 ?><# if ( ! _.isEmpty( data.model.<?php echo $type ?> ) ) { 1139 if ( ! _.isUndefined( html5types.<?php echo $type ?> ) ) { 1140 delete html5types.<?php echo $type ?>; 1177 <?php 1178 foreach ( $video_types as $type ) : 1179 ?> 1180 <# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) { 1181 if ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) { 1182 delete html5types.<?php echo $type; ?>; 1141 1183 } 1142 1184 #> 1143 1185 <label class="setting"> 1144 <span><?php echo strtoupper( $type ) ?></span>1145 <input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type?> }}" />1186 <span><?php echo strtoupper( $type ); ?></span> 1187 <input type="text" disabled="disabled" data-setting="<?php echo $type; ?>" value="{{ data.model.<?php echo $type; ?> }}" /> 1146 1188 <button type="button" class="button-link remove-setting"><?php _e( 'Remove video source' ); ?></button> 1147 1189 </label>
Note: See TracChangeset
for help on using the changeset viewer.