diff --git wp-includes/js/media-models.js wp-includes/js/media-models.js
index e9776b4..3bfef8e 100644
|
|
|
window.wp = window.wp || {}; |
| 60 | 60 | template: _.memoize( function( id ) { |
| 61 | 61 | var compiled; |
| 62 | 62 | return function( data ) { |
| 63 | | compiled = compiled || _.template( $( '#tmpl-' + id ).html() ); |
| | 63 | var options = { |
| | 64 | evaluate: /<#([\s\S]+?)#>/g, |
| | 65 | interpolate: /<#=([\s\S]+?)#>/g, |
| | 66 | escape: /<#-([\s\S]+?)#>/g |
| | 67 | } |
| | 68 | compiled = compiled || _.template( $( '#tmpl-' + id ).html(), null, options ); |
| 64 | 69 | return compiled( data ); |
| 65 | 70 | }; |
| 66 | 71 | }), |
diff --git wp-includes/media.php wp-includes/media.php
index 990d64e..a3690f4 100644
|
|
|
function wp_print_media_templates( $attachment ) { |
| 1297 | 1297 | ?> |
| 1298 | 1298 | <script type="text/html" id="tmpl-media-modal"> |
| 1299 | 1299 | <div class="media-modal"> |
| 1300 | | <h3 class="media-modal-title"><%- title %></h3> |
| | 1300 | <h3 class="media-modal-title"><#- title #></h3> |
| 1301 | 1301 | <a class="media-modal-close" href="" title="<?php esc_attr_e('Close'); ?>">×</a> |
| 1302 | 1302 | </div> |
| 1303 | 1303 | <div class="media-modal-backdrop"></div> |
| … |
… |
function wp_print_media_templates( $attachment ) { |
| 1317 | 1317 | </script> |
| 1318 | 1318 | |
| 1319 | 1319 | <script type="text/html" id="tmpl-sidebar"> |
| 1320 | | <h2 class="sidebar-title"><%- title %></h2> |
| | 1320 | <h2 class="sidebar-title"><#- title #></h2> |
| 1321 | 1321 | <div class="sidebar-content"></div> |
| 1322 | 1322 | </script> |
| 1323 | 1323 | |
| 1324 | 1324 | <script type="text/html" id="tmpl-attachment"> |
| 1325 | | <div class="attachment-preview type-<%- type %> subtype-<%- subtype %> <%- orientation %>"> |
| 1326 | | <% if ( uploading ) { %> |
| | 1325 | <div class="attachment-preview type-<#- type #> subtype-<#- subtype #> <#- orientation #>"> |
| | 1326 | <# if ( uploading ) { #> |
| 1327 | 1327 | <div class="media-progress-bar"><div></div></div> |
| 1328 | | <% } else if ( 'image' === type ) { %> |
| | 1328 | <# } else if ( 'image' === type ) { #> |
| 1329 | 1329 | <div class="thumbnail"> |
| 1330 | 1330 | <div class="centered"> |
| 1331 | | <img src="<%- url %>" draggable="false" /> |
| | 1331 | <img src="<#- url #>" draggable="false" /> |
| 1332 | 1332 | </div> |
| 1333 | 1333 | </div> |
| 1334 | | <% } else { %> |
| 1335 | | <img src="<%- icon %>" class="icon" draggable="false" /> |
| 1336 | | <div class="filename"><%- filename %></div> |
| 1337 | | <% } %> |
| | 1334 | <# } else { #> |
| | 1335 | <img src="<#- icon #>" class="icon" draggable="false" /> |
| | 1336 | <div class="filename"><#- filename #></div> |
| | 1337 | <# } #> |
| 1338 | 1338 | |
| 1339 | | <% if ( buttons.close ) { %> |
| | 1339 | <# if ( buttons.close ) { #> |
| 1340 | 1340 | <a class="close button" href="#">×</a> |
| 1341 | | <% } %> |
| | 1341 | <# } #> |
| 1342 | 1342 | </div> |
| 1343 | | <% if ( describe ) { %> |
| 1344 | | <% if ( 'image' === type ) { %> |
| | 1343 | <# if ( describe ) { #> |
| | 1344 | <# if ( 'image' === type ) { #> |
| 1345 | 1345 | <textarea class="describe" |
| 1346 | 1346 | placeholder="<?php esc_attr_e('Describe this image…'); ?>" |
| 1347 | | ><%- caption %></textarea> |
| 1348 | | <% } else { %> |
| | 1347 | ><#- caption #></textarea> |
| | 1348 | <# } else { #> |
| 1349 | 1349 | <textarea class="describe" |
| 1350 | | <% if ( 'video' === type ) { %> |
| | 1350 | <# if ( 'video' === type ) { #> |
| 1351 | 1351 | placeholder="<?php esc_attr_e('Describe this video…'); ?>" |
| 1352 | | <% } else if ( 'audio' === type ) { %> |
| | 1352 | <# } else if ( 'audio' === type ) { #> |
| 1353 | 1353 | placeholder="<?php esc_attr_e('Describe this audio file…'); ?>" |
| 1354 | | <% } else { %> |
| | 1354 | <# } else { #> |
| 1355 | 1355 | placeholder="<?php esc_attr_e('Describe this media file…'); ?>" |
| 1356 | | <% } %> |
| 1357 | | ><%- title %></textarea> |
| 1358 | | <% } %> |
| 1359 | | <% } %> |
| | 1356 | <# } #> |
| | 1357 | ><#- title #></textarea> |
| | 1358 | <# } #> |
| | 1359 | <# } #> |
| 1360 | 1360 | </script> |
| 1361 | 1361 | |
| 1362 | 1362 | <script type="text/html" id="tmpl-attachment-details"> |
| 1363 | | <div class="attachment-preview attachment-details-preview type-<%- type %> subtype-<%- subtype %> <%- orientation %>"> |
| 1364 | | <% if ( uploading ) { %> |
| | 1363 | <div class="attachment-preview attachment-details-preview type-<#- type #> subtype-<#- subtype #> <#- orientation #>"> |
| | 1364 | <# if ( uploading ) { #> |
| 1365 | 1365 | <div class="media-progress-bar"><div></div></div> |
| 1366 | | <% } else if ( 'image' === type ) { %> |
| | 1366 | <# } else if ( 'image' === type ) { #> |
| 1367 | 1367 | <div class="thumbnail"> |
| 1368 | | <img src="<%- url %>" draggable="false" /> |
| | 1368 | <img src="<#- url #>" draggable="false" /> |
| 1369 | 1369 | </div> |
| 1370 | | <% } else { %> |
| | 1370 | <# } else { #> |
| 1371 | 1371 | <div class="icon-thumbnail"> |
| 1372 | | <img src="<%- icon %>" class="icon" draggable="false" /> |
| 1373 | | <div class="filename"><%- filename %></div> |
| | 1372 | <img src="<#- icon #>" class="icon" draggable="false" /> |
| | 1373 | <div class="filename"><#- filename #></div> |
| 1374 | 1374 | </div> |
| 1375 | | <% } %> |
| | 1375 | <# } #> |
| 1376 | 1376 | </div> |
| 1377 | 1377 | |
| 1378 | | <% if ( 'image' === type ) { %> |
| | 1378 | <# if ( 'image' === type ) { #> |
| 1379 | 1379 | <textarea class="describe" |
| 1380 | 1380 | placeholder="<?php esc_attr_e('Describe this image…'); ?>" |
| 1381 | | ><%- caption %></textarea> |
| 1382 | | <% } else { %> |
| | 1381 | ><#- caption #></textarea> |
| | 1382 | <# } else { #> |
| 1383 | 1383 | <textarea class="describe" |
| 1384 | | <% if ( 'video' === type ) { %> |
| | 1384 | <# if ( 'video' === type ) { #> |
| 1385 | 1385 | placeholder="<?php esc_attr_e('Describe this video…'); ?>" |
| 1386 | | <% } else if ( 'audio' === type ) { %> |
| | 1386 | <# } else if ( 'audio' === type ) { #> |
| 1387 | 1387 | placeholder="<?php esc_attr_e('Describe this audio file…'); ?>" |
| 1388 | | <% } else { %> |
| | 1388 | <# } else { #> |
| 1389 | 1389 | placeholder="<?php esc_attr_e('Describe this media file…'); ?>" |
| 1390 | | <% } %> |
| 1391 | | ><%- title %></textarea> |
| 1392 | | <% } %> |
| | 1390 | <# } #> |
| | 1391 | ><#- title #></textarea> |
| | 1392 | <# } #> |
| 1393 | 1393 | </script> |
| 1394 | 1394 | |
| 1395 | 1395 | <script type="text/html" id="tmpl-media-selection-preview"> |
| 1396 | | <div class="selected-img selected-count-<%- count %>"> |
| 1397 | | <% if ( thumbnail ) { %> |
| 1398 | | <img src="<%- thumbnail %>" draggable="false" /> |
| 1399 | | <% } %> |
| | 1396 | <div class="selected-img selected-count-<#- count #>"> |
| | 1397 | <# if ( thumbnail ) { #> |
| | 1398 | <img src="<#- thumbnail #>" draggable="false" /> |
| | 1399 | <# } #> |
| 1400 | 1400 | |
| 1401 | | <span class="count"><%- count %></span> |
| | 1401 | <span class="count"><#- count #></span> |
| 1402 | 1402 | </div> |
| 1403 | | <% if ( clearable ) { %> |
| | 1403 | <# if ( clearable ) { #> |
| 1404 | 1404 | <a class="clear-selection" href="#"><?php _e('Clear selection'); ?></a> |
| 1405 | | <% } %> |
| | 1405 | <# } #> |
| 1406 | 1406 | </script> |
| 1407 | 1407 | |
| 1408 | 1408 | <script type="text/html" id="tmpl-attachment-display-settings"> |
| … |
… |
function wp_print_media_templates( $attachment ) { |
| 1450 | 1450 | <h4><?php _e('Gallery Columns'); ?></h4> |
| 1451 | 1451 | |
| 1452 | 1452 | <select class="columns" name="columns" data-setting="columns"> |
| 1453 | | <% _.times( 9, function( i ) { %> |
| 1454 | | <option value="<%- i %>"><%- i %></option> |
| 1455 | | <% }); %> |
| | 1453 | <# _.times( 9, function( i ) { #> |
| | 1454 | <option value="<#- i #>"><#- i #></option> |
| | 1455 | <# }); #> |
| 1456 | 1456 | </select> |
| 1457 | 1457 | </script> |
| 1458 | 1458 | |
| 1459 | 1459 | <script type="text/html" id="tmpl-editor-attachment"> |
| 1460 | 1460 | <div class="editor-attachment-preview"> |
| 1461 | | <% if ( url ) { %> |
| 1462 | | <img src="<%- url %>" width="<%- width %>" height="<%- height %>" draggable="false" /> |
| 1463 | | <% } %> |
| | 1461 | <# if ( url ) { #> |
| | 1462 | <img src="<#- url #>" width="<#- width #>" height="<#- height #>" draggable="false" /> |
| | 1463 | <# } #> |
| 1464 | 1464 | |
| 1465 | | <% if ( uploading ) { %> |
| | 1465 | <# if ( uploading ) { #> |
| 1466 | 1466 | <div class="media-progress-bar"><div></div></div> |
| 1467 | | <% } %> |
| | 1467 | <# } #> |
| 1468 | 1468 | <div class="overlay"> |
| 1469 | 1469 | <div class="button close">×</div> |
| 1470 | 1470 | </div> |
| … |
… |
function wp_print_media_templates( $attachment ) { |
| 1473 | 1473 | </script> |
| 1474 | 1474 | |
| 1475 | 1475 | <script type="text/html" id="tmpl-editor-gallery"> |
| 1476 | | <% if ( url ) { %> |
| 1477 | | <img src="<%- url %>" draggable="false" /> |
| 1478 | | <% } %> |
| | 1476 | <# if ( url ) { #> |
| | 1477 | <img src="<#- url #>" draggable="false" /> |
| | 1478 | <# } #> |
| 1479 | 1479 | |
| 1480 | 1480 | <div class="overlay"> |
| 1481 | 1481 | <div class="button close">×</div> |
| … |
… |
function wp_print_media_templates( $attachment ) { |
| 1484 | 1484 | </script> |
| 1485 | 1485 | |
| 1486 | 1486 | <script type="text/html" id="tmpl-attachments-css"> |
| 1487 | | <style type="text/css" id="<%- id %>-css"> |
| 1488 | | #<%- id %> { |
| 1489 | | padding: <%- gutter %>px; |
| | 1487 | <style type="text/css" id="<#- id #>-css"> |
| | 1488 | #<#- id #> { |
| | 1489 | padding: <#- gutter #>px; |
| 1490 | 1490 | } |
| 1491 | 1491 | |
| 1492 | | #<%- id %> .attachment { |
| 1493 | | margin: <%- gutter %>px; |
| 1494 | | width: <%- edge %>px; |
| | 1492 | #<#- id #> .attachment { |
| | 1493 | margin: <#- gutter #>px; |
| | 1494 | width: <#- edge #>px; |
| 1495 | 1495 | } |
| 1496 | 1496 | |
| 1497 | | #<%- id %> .attachment-preview, |
| 1498 | | #<%- id %> .attachment-preview .thumbnail { |
| 1499 | | width: <%- edge %>px; |
| 1500 | | height: <%- edge %>px; |
| | 1497 | #<#- id #> .attachment-preview, |
| | 1498 | #<#- id #> .attachment-preview .thumbnail { |
| | 1499 | width: <#- edge #>px; |
| | 1500 | height: <#- edge #>px; |
| 1501 | 1501 | } |
| 1502 | 1502 | |
| 1503 | | #<%- id %> .portrait .thumbnail img { |
| 1504 | | width: <%- edge %>px; |
| | 1503 | #<#- id #> .portrait .thumbnail img { |
| | 1504 | width: <#- edge #>px; |
| 1505 | 1505 | height: auto; |
| 1506 | 1506 | } |
| 1507 | 1507 | |
| 1508 | | #<%- id %> .landscape .thumbnail img { |
| | 1508 | #<#- id #> .landscape .thumbnail img { |
| 1509 | 1509 | width: auto; |
| 1510 | | height: <%- edge %>px; |
| | 1510 | height: <#- edge #>px; |
| 1511 | 1511 | } |
| 1512 | 1512 | </style> |
| 1513 | 1513 | </script> |