Changeset 43571 for trunk/src/wp-includes/media-template.php
- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media-template.php
r42624 r43571 16 16 function wp_underscore_audio_template() { 17 17 $audio_types = wp_get_audio_extensions(); 18 ?>18 ?> 19 19 <audio style="visibility: hidden" 20 20 controls … … 25 25 <?php 26 26 foreach ( array( 'autoplay', 'loop' ) as $attr ) : 27 ?>27 ?> 28 28 if ( ! _.isUndefined( data.model.<?php echo $attr; ?> ) && data.model.<?php echo $attr; ?> ) { 29 29 #> <?php echo $attr; ?><# … … 37 37 <?php 38 38 foreach ( $audio_types as $type ) : 39 ?>39 ?> 40 40 <# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) { #> 41 41 <source src="{{ data.model.<?php echo $type; ?> }}" type="{{ wp.media.view.settings.embedMimes[ '<?php echo $type; ?>' ] }}" /> 42 42 <# } #> 43 <?php 44 endforeach; 45 ?> 46 </audio> 43 47 <?php 44 endforeach;45 ?>46 </audio>47 <?php48 48 } 49 49 … … 56 56 function wp_underscore_video_template() { 57 57 $video_types = wp_get_video_extensions(); 58 ?>58 ?> 59 59 <# var w_rule = '', classes = [], 60 60 w, h, settings = wp.media.view.settings, … … 97 97 <# if ( h ) { #>height="{{ h }}"<# } #> 98 98 <?php 99 $props 99 $props = array( 100 100 'poster' => '', 101 101 'preload' => 'metadata', … … 103 103 foreach ( $props as $key => $value ) : 104 104 if ( empty( $value ) ) { 105 ?>105 ?> 106 106 <# 107 107 if ( ! _.isUndefined( data.model.<?php echo $key; ?> ) && data.model.<?php echo $key; ?> ) { 108 108 #> <?php echo $key; ?>="{{ data.model.<?php echo $key; ?> }}"<# 109 109 } #> 110 <?php110 <?php 111 111 } else { 112 112 echo $key … … 120 120 <?php 121 121 foreach ( array( 'autoplay', 'loop' ) as $attr ) : 122 ?>122 ?> 123 123 if ( ! _.isUndefined( data.model.<?php echo $attr; ?> ) && data.model.<?php echo $attr; ?> ) { 124 124 #> <?php echo $attr; ?><# … … 138 138 <?php 139 139 foreach ( $video_types as $type ) : 140 ?>140 ?> 141 141 <# if ( data.model.<?php echo $type; ?> ) { #> 142 142 <source src="{{ data.model.<?php echo $type; ?> }}" type="{{ settings.embedMimes[ '<?php echo $type; ?>' ] }}" /> … … 146 146 </video> 147 147 </div> 148 <?php148 <?php 149 149 } 150 150 … … 414 414 'album' => __( 'Album' ), 415 415 ) as $key => $label ) : 416 ?>416 ?> 417 417 <label class="setting" data-setting="<?php echo esc_attr( $key ); ?>"> 418 418 <span class="name"><?php echo $label; ?></span> … … 597 597 'album' => __( 'Album' ), 598 598 ) as $key => $label ) : 599 ?>599 ?> 600 600 <label class="setting" data-setting="<?php echo esc_attr( $key ); ?>"> 601 601 <span class="name"><?php echo $label; ?></span> … … 720 720 /** This filter is documented in wp-admin/includes/media.php */ 721 721 $sizes = apply_filters( 722 'image_size_names_choose', array( 722 'image_size_names_choose', 723 array( 723 724 'thumbnail' => __( 'Thumbnail' ), 724 725 'medium' => __( 'Medium' ), … … 729 730 730 731 foreach ( $sizes as $value => $name ) : 731 ?>732 ?> 732 733 <# 733 734 var size = data.sizes['<?php echo esc_js( $value ); ?>']; … … 798 799 /** This filter is documented in wp-admin/includes/media.php */ 799 800 $size_names = apply_filters( 800 'image_size_names_choose', array( 801 'image_size_names_choose', 802 array( 801 803 'thumbnail' => __( 'Thumbnail' ), 802 804 'medium' => __( 'Medium' ), … … 807 809 808 810 foreach ( $size_names as $size => $label ) : 809 ?>811 ?> 810 812 <option value="<?php echo esc_attr( $size ); ?>"> 811 813 <?php echo esc_html( $label ); ?> … … 868 870 /** This filter is documented in wp-admin/includes/media.php */ 869 871 if ( ! apply_filters( 'disable_captions', '' ) ) : 870 ?>872 ?> 871 873 <label class="setting caption"> 872 874 <span><?php _e( 'Caption' ); ?></span> … … 934 936 /** This filter is documented in wp-admin/includes/media.php */ 935 937 if ( ! apply_filters( 'disable_captions', '' ) ) : 936 ?>938 ?> 937 939 <label class="setting caption"> 938 940 <span><?php _e( 'Caption' ); ?></span> … … 977 979 /** This filter is documented in wp-admin/includes/media.php */ 978 980 $sizes = apply_filters( 979 'image_size_names_choose', array( 981 'image_size_names_choose', 982 array( 980 983 'thumbnail' => __( 'Thumbnail' ), 981 984 'medium' => __( 'Medium' ), … … 986 989 987 990 foreach ( $sizes as $value => $name ) : 988 ?>991 ?> 989 992 <# 990 993 var size = data.sizes['<?php echo esc_js( $value ); ?>']; … … 1094 1097 1095 1098 foreach ( $audio_types as $type ) : 1096 ?>1099 ?> 1097 1100 <# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) { 1098 1101 if ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) { … … 1177 1180 <?php 1178 1181 foreach ( $video_types as $type ) : 1179 ?>1182 ?> 1180 1183 <# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) { 1181 1184 if ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) {
Note: See TracChangeset
for help on using the changeset viewer.