diff --git wp-includes/js/media-models.js wp-includes/js/media-models.js
index e9776b4..917c245 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 079aab5..493e5d7 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"> |
| … |
… |
function wp_print_media_templates( $attachment ) {
|
| 1320 | 1320 | </script> |
| 1321 | 1321 | |
| 1322 | 1322 | <script type="text/html" id="tmpl-attachment"> |
| 1323 | | <div class="attachment-preview type-<%- type %> subtype-<%- subtype %> <%- orientation %>"> |
| 1324 | | <% if ( uploading ) { %> |
| | 1323 | <div class="attachment-preview type-{{ type }} subtype-{{ subtype }} {{ orientation }}"> |
| | 1324 | <# if ( uploading ) { #> |
| 1325 | 1325 | <div class="media-progress-bar"><div></div></div> |
| 1326 | | <% } else if ( 'image' === type ) { %> |
| | 1326 | <# } else if ( 'image' === type ) { #> |
| 1327 | 1327 | <div class="thumbnail"> |
| 1328 | 1328 | <div class="centered"> |
| 1329 | | <img src="<%- url %>" draggable="false" /> |
| | 1329 | <img src="{{ url }}" draggable="false" /> |
| 1330 | 1330 | </div> |
| 1331 | 1331 | </div> |
| 1332 | | <% } else { %> |
| 1333 | | <img src="<%- icon %>" class="icon" draggable="false" /> |
| 1334 | | <div class="filename"><%- filename %></div> |
| 1335 | | <% } %> |
| | 1332 | <# } else { #> |
| | 1333 | <img src="{{ icon }}" class="icon" draggable="false" /> |
| | 1334 | <div class="filename">{{ filename }}</div> |
| | 1335 | <# } #> |
| 1336 | 1336 | |
| 1337 | | <% if ( buttons.close ) { %> |
| | 1337 | <# if ( buttons.close ) { #> |
| 1338 | 1338 | <a class="close button" href="#">×</a> |
| 1339 | | <% } %> |
| | 1339 | <# } #> |
| 1340 | 1340 | </div> |
| 1341 | | <% if ( describe ) { %> |
| 1342 | | <% if ( 'image' === type ) { %> |
| | 1341 | <# if ( describe ) { #> |
| | 1342 | <# if ( 'image' === type ) { #> |
| 1343 | 1343 | <textarea class="describe" |
| 1344 | 1344 | placeholder="<?php esc_attr_e('Describe this image…'); ?>" |
| 1345 | | ><%- caption %></textarea> |
| 1346 | | <% } else { %> |
| | 1345 | >{{ caption }}</textarea> |
| | 1346 | <# } else { #> |
| 1347 | 1347 | <textarea class="describe" |
| 1348 | | <% if ( 'video' === type ) { %> |
| | 1348 | <# if ( 'video' === type ) { #> |
| 1349 | 1349 | placeholder="<?php esc_attr_e('Describe this video…'); ?>" |
| 1350 | | <% } else if ( 'audio' === type ) { %> |
| | 1350 | <# } else if ( 'audio' === type ) { #> |
| 1351 | 1351 | placeholder="<?php esc_attr_e('Describe this audio file…'); ?>" |
| 1352 | | <% } else { %> |
| | 1352 | <# } else { #> |
| 1353 | 1353 | placeholder="<?php esc_attr_e('Describe this media file…'); ?>" |
| 1354 | | <% } %> |
| 1355 | | ><%- title %></textarea> |
| 1356 | | <% } %> |
| 1357 | | <% } %> |
| | 1354 | <# } #> |
| | 1355 | >{{ title }}</textarea> |
| | 1356 | <# } #> |
| | 1357 | <# } #> |
| 1358 | 1358 | </script> |
| 1359 | 1359 | |
| 1360 | 1360 | <script type="text/html" id="tmpl-attachment-details"> |
| 1361 | 1361 | <h3><?php _e('Edit Attachment Details'); ?></h3> |
| 1362 | | <div class="attachment-preview attachment-details-preview type-<%- type %> subtype-<%- subtype %> <%- orientation %>"> |
| 1363 | | <% if ( uploading ) { %> |
| | 1362 | <div class="attachment-preview attachment-details-preview type-{{ type }} subtype-{{ subtype }} {{ orientation }}"> |
| | 1363 | <# if ( uploading ) { #> |
| 1364 | 1364 | <div class="media-progress-bar"><div></div></div> |
| 1365 | | <% } else if ( 'image' === type ) { %> |
| | 1365 | <# } else if ( 'image' === type ) { #> |
| 1366 | 1366 | <div class="thumbnail"> |
| 1367 | | <img src="<%- url %>" draggable="false" /> |
| | 1367 | <img src="{{ url }}" draggable="false" /> |
| 1368 | 1368 | </div> |
| 1369 | | <% } else { %> |
| | 1369 | <# } else { #> |
| 1370 | 1370 | <div class="icon-thumbnail"> |
| 1371 | | <img src="<%- icon %>" class="icon" draggable="false" /> |
| 1372 | | <div class="filename"><%- filename %></div> |
| | 1371 | <img src="{{ icon }}" class="icon" draggable="false" /> |
| | 1372 | <div class="filename">{{ filename }}</div> |
| 1373 | 1373 | </div> |
| 1374 | | <% } %> |
| | 1374 | <# } #> |
| 1375 | 1375 | </div> |
| 1376 | 1376 | |
| 1377 | | <% if ( 'image' === type ) { %> |
| | 1377 | <# if ( 'image' === type ) { #> |
| 1378 | 1378 | <textarea class="describe" |
| 1379 | 1379 | placeholder="<?php esc_attr_e('Describe this image…'); ?>" |
| 1380 | | ><%- caption %></textarea> |
| 1381 | | <% } else { %> |
| | 1380 | >{{ caption }}</textarea> |
| | 1381 | <# } else { #> |
| 1382 | 1382 | <textarea class="describe" |
| 1383 | | <% if ( 'video' === type ) { %> |
| | 1383 | <# if ( 'video' === type ) { #> |
| 1384 | 1384 | placeholder="<?php esc_attr_e('Describe this video…'); ?>" |
| 1385 | | <% } else if ( 'audio' === type ) { %> |
| | 1385 | <# } else if ( 'audio' === type ) { #> |
| 1386 | 1386 | placeholder="<?php esc_attr_e('Describe this audio file…'); ?>" |
| 1387 | | <% } else { %> |
| | 1387 | <# } else { #> |
| 1388 | 1388 | placeholder="<?php esc_attr_e('Describe this media file…'); ?>" |
| 1389 | | <% } %> |
| 1390 | | ><%- title %></textarea> |
| 1391 | | <% } %> |
| | 1389 | <# } #> |
| | 1390 | >{{ title }}</textarea> |
| | 1391 | <# } #> |
| 1392 | 1392 | </script> |
| 1393 | 1393 | |
| 1394 | 1394 | <script type="text/html" id="tmpl-media-selection"> |
| 1395 | 1395 | <div class="selection-info"> |
| 1396 | 1396 | <span class="count"></span> |
| 1397 | | <% if ( clearable ) { %> |
| | 1397 | <# if ( clearable ) { #> |
| 1398 | 1398 | <a class="clear-selection" href="#"><?php _e('Clear'); ?></a> |
| 1399 | | <% } %> |
| | 1399 | <# } #> |
| 1400 | 1400 | </div> |
| 1401 | 1401 | <div class="selection-view"></div> |
| 1402 | 1402 | </script> |
| 1403 | 1403 | |
| 1404 | 1404 | <script type="text/html" id="tmpl-media-selection-preview"> |
| 1405 | | <div class="selected-img selected-count-<%- count %>"> |
| 1406 | | <% if ( thumbnail ) { %> |
| 1407 | | <img src="<%- thumbnail %>" draggable="false" /> |
| 1408 | | <% } %> |
| | 1405 | <div class="selected-img selected-count-{{ count }}"> |
| | 1406 | <# if ( thumbnail ) { #> |
| | 1407 | <img src="{{ thumbnail }}" draggable="false" /> |
| | 1408 | <# } #> |
| 1409 | 1409 | |
| 1410 | | <span class="count"><%- count %></span> |
| | 1410 | <span class="count">{{ count }}</span> |
| 1411 | 1411 | </div> |
| 1412 | | <% if ( clearable ) { %> |
| | 1412 | <# if ( clearable ) { #> |
| 1413 | 1413 | <a class="clear-selection" href="#"><?php _e('Clear selection'); ?></a> |
| 1414 | | <% } %> |
| | 1414 | <# } #> |
| 1415 | 1415 | </script> |
| 1416 | 1416 | |
| 1417 | 1417 | <script type="text/html" id="tmpl-attachment-display-settings"> |
| … |
… |
function wp_print_media_templates( $attachment ) {
|
| 1459 | 1459 | <h4><?php _e('Gallery Columns'); ?></h4> |
| 1460 | 1460 | |
| 1461 | 1461 | <select class="columns" name="columns" data-setting="columns"> |
| 1462 | | <% _.times( 9, function( i ) { %> |
| 1463 | | <option value="<%- i %>"><%- i %></option> |
| 1464 | | <% }); %> |
| | 1462 | <# _.times( 9, function( i ) { #> |
| | 1463 | <option value="{{ i }}">{{ i }}</option> |
| | 1464 | <# }); }} |
| 1465 | 1465 | </select> |
| 1466 | 1466 | </script> |
| 1467 | 1467 | |
| 1468 | 1468 | <script type="text/html" id="tmpl-editor-attachment"> |
| 1469 | 1469 | <div class="editor-attachment-preview"> |
| 1470 | | <% if ( url ) { %> |
| 1471 | | <img src="<%- url %>" width="<%- width %>" height="<%- height %>" draggable="false" /> |
| 1472 | | <% } %> |
| | 1470 | <# if ( url ) { #> |
| | 1471 | <img src="{{ url }}" width="{{ width }}" height="{{ height }}" draggable="false" /> |
| | 1472 | <# } #> |
| 1473 | 1473 | |
| 1474 | | <% if ( uploading ) { %> |
| | 1474 | <# if ( uploading ) { #> |
| 1475 | 1475 | <div class="media-progress-bar"><div></div></div> |
| 1476 | | <% } %> |
| | 1476 | <# } #> |
| 1477 | 1477 | <div class="overlay"> |
| 1478 | 1478 | <div class="button close">×</div> |
| 1479 | 1479 | </div> |
| … |
… |
function wp_print_media_templates( $attachment ) {
|
| 1482 | 1482 | </script> |
| 1483 | 1483 | |
| 1484 | 1484 | <script type="text/html" id="tmpl-editor-gallery"> |
| 1485 | | <% if ( url ) { %> |
| 1486 | | <img src="<%- url %>" draggable="false" /> |
| 1487 | | <% } %> |
| | 1485 | <# if ( url ) { #> |
| | 1486 | <img src="{{ url }}" draggable="false" /> |
| | 1487 | <# } #> |
| 1488 | 1488 | |
| 1489 | 1489 | <div class="overlay"> |
| 1490 | 1490 | <div class="button close">×</div> |
| … |
… |
function wp_print_media_templates( $attachment ) {
|
| 1493 | 1493 | </script> |
| 1494 | 1494 | |
| 1495 | 1495 | <script type="text/html" id="tmpl-attachments-css"> |
| 1496 | | <style type="text/css" id="<%- id %>-css"> |
| 1497 | | #<%- id %> { |
| 1498 | | padding: 0 <%- gutter %>px; |
| | 1496 | <style type="text/css" id="{{ id }}-css"> |
| | 1497 | #{{ id }} { |
| | 1498 | padding: 0 {{ gutter }}px; |
| 1499 | 1499 | } |
| 1500 | 1500 | |
| 1501 | | #<%- id %> .attachment { |
| 1502 | | margin: <%- gutter %>px; |
| 1503 | | width: <%- edge %>px; |
| | 1501 | #{{ id }} .attachment { |
| | 1502 | margin: {{ gutter }}px; |
| | 1503 | width: {{ edge }}px; |
| 1504 | 1504 | } |
| 1505 | 1505 | |
| 1506 | | #<%- id %> .attachment-preview, |
| 1507 | | #<%- id %> .attachment-preview .thumbnail { |
| 1508 | | width: <%- edge %>px; |
| 1509 | | height: <%- edge %>px; |
| | 1506 | #{{ id }} .attachment-preview, |
| | 1507 | #{{ id }} .attachment-preview .thumbnail { |
| | 1508 | width: {{ edge }}px; |
| | 1509 | height: {{ edge }}px; |
| 1510 | 1510 | } |
| 1511 | 1511 | |
| 1512 | | #<%- id %> .portrait .thumbnail img { |
| 1513 | | width: <%- edge %>px; |
| | 1512 | #{{ id }} .portrait .thumbnail img { |
| | 1513 | width: {{ edge }}px; |
| 1514 | 1514 | height: auto; |
| 1515 | 1515 | } |
| 1516 | 1516 | |
| 1517 | | #<%- id %> .landscape .thumbnail img { |
| | 1517 | #{{ id }} .landscape .thumbnail img { |
| 1518 | 1518 | width: auto; |
| 1519 | | height: <%- edge %>px; |
| | 1519 | height: {{ edge }}px; |
| 1520 | 1520 | } |
| 1521 | 1521 | </style> |
| 1522 | 1522 | </script> |