Changeset 44661
- Timestamp:
- 01/21/2019 04:12:10 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-media-gallery.php
r43571 r44661 177 177 <script type="text/html" id="tmpl-wp-media-widget-gallery-preview"> 178 178 <# var describedById = 'describedBy-' + String( Math.random() ); #> 179 <# if ( data.ids.length ) { #> 179 <# 180 var ids = _.filter( data.ids, function( id ) { 181 return ( id in data.attachments ); 182 } ); 183 #> 184 <# if ( ids.length ) { #> 180 185 <div class="gallery media-widget-gallery-preview"> 181 <# _.each( data.ids, function( id, index ) { #> 182 <# 183 var attachment = data.attachments[ id ]; 184 if ( ! attachment ) { 185 return; 186 } 187 #> 186 <# _.each( ids, function( id, index ) { #> 187 <# var attachment = data.attachments[ id ]; #> 188 188 <# if ( index < 6 ) { #> 189 189 <dl class="gallery-item"> … … 194 194 <img src="{{ attachment.url }}" alt="" /> 195 195 <# } #> 196 <# if ( index === 5 && data.ids.length > 6 ) { #>196 <# if ( index === 5 && ids.length > 6 ) { #> 197 197 <div class="gallery-icon-placeholder"> 198 <p class="gallery-icon-placeholder-text">+{{ data.ids.length - 5 }}</p>198 <p class="gallery-icon-placeholder-text">+{{ ids.length - 5 }}</p> 199 199 </div> 200 200 <# } #>
Note: See TracChangeset
for help on using the changeset viewer.