author | ymh <ymh.work@gmail.com> |
Wed, 21 Sep 2022 18:19:35 +0200 | |
changeset 18 | be944660c56a |
parent 16 | a86126ab1dd4 |
child 19 | 3d72ae0968f4 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* WordPress media templates. |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Media |
|
7 |
* @since 3.5.0 |
|
8 |
*/ |
|
9 |
||
10 |
/** |
|
5 | 11 |
* Output the markup for a audio tag to be used in an Underscore template |
12 |
* when data.model is passed. |
|
13 |
* |
|
14 |
* @since 3.9.0 |
|
15 |
*/ |
|
16 |
function wp_underscore_audio_template() { |
|
17 |
$audio_types = wp_get_audio_extensions(); |
|
9 | 18 |
?> |
5 | 19 |
<audio style="visibility: hidden" |
20 |
controls |
|
21 |
class="wp-audio-shortcode" |
|
22 |
width="{{ _.isUndefined( data.model.width ) ? 400 : data.model.width }}" |
|
23 |
preload="{{ _.isUndefined( data.model.preload ) ? 'none' : data.model.preload }}" |
|
24 |
<# |
|
9 | 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; ?><# |
|
5 | 30 |
} |
31 |
<?php endforeach ?>#> |
|
32 |
> |
|
33 |
<# if ( ! _.isEmpty( data.model.src ) ) { #> |
|
34 |
<source src="{{ data.model.src }}" type="{{ wp.media.view.settings.embedMimes[ data.model.src.split('.').pop() ] }}" /> |
|
35 |
<# } #> |
|
36 |
||
9 | 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; ?>' ] }}" /> |
|
5 | 42 |
<# } #> |
9 | 43 |
<?php |
44 |
endforeach; |
|
45 |
?> |
|
46 |
</audio> |
|
47 |
<?php |
|
5 | 48 |
} |
49 |
||
50 |
/** |
|
51 |
* Output the markup for a video tag to be used in an Underscore template |
|
52 |
* when data.model is passed. |
|
53 |
* |
|
54 |
* @since 3.9.0 |
|
55 |
*/ |
|
56 |
function wp_underscore_video_template() { |
|
57 |
$video_types = wp_get_video_extensions(); |
|
9 | 58 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
59 |
<# var w_rule = '', classes = [], |
5 | 60 |
w, h, settings = wp.media.view.settings, |
61 |
isYouTube = isVimeo = false; |
|
62 |
||
63 |
if ( ! _.isEmpty( data.model.src ) ) { |
|
64 |
isYouTube = data.model.src.match(/youtube|youtu\.be/); |
|
65 |
isVimeo = -1 !== data.model.src.indexOf('vimeo'); |
|
66 |
} |
|
67 |
||
68 |
if ( settings.contentWidth && data.model.width >= settings.contentWidth ) { |
|
69 |
w = settings.contentWidth; |
|
70 |
} else { |
|
71 |
w = data.model.width; |
|
72 |
} |
|
73 |
||
74 |
if ( w !== data.model.width ) { |
|
75 |
h = Math.ceil( ( data.model.height * w ) / data.model.width ); |
|
76 |
} else { |
|
77 |
h = data.model.height; |
|
9 | 78 |
} |
5 | 79 |
|
80 |
if ( w ) { |
|
81 |
w_rule = 'width: ' + w + 'px; '; |
|
82 |
} |
|
83 |
||
84 |
if ( isYouTube ) { |
|
85 |
classes.push( 'youtube-video' ); |
|
86 |
} |
|
87 |
||
88 |
if ( isVimeo ) { |
|
89 |
classes.push( 'vimeo-video' ); |
|
90 |
} |
|
91 |
||
92 |
#> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
93 |
<div style="{{ w_rule }}" class="wp-video"> |
5 | 94 |
<video controls |
95 |
class="wp-video-shortcode {{ classes.join( ' ' ) }}" |
|
96 |
<# if ( w ) { #>width="{{ w }}"<# } #> |
|
97 |
<# if ( h ) { #>height="{{ h }}"<# } #> |
|
98 |
<?php |
|
9 | 99 |
$props = array( |
100 |
'poster' => '', |
|
101 |
'preload' => 'metadata', |
|
102 |
); |
|
103 |
foreach ( $props as $key => $value ) : |
|
5 | 104 |
if ( empty( $value ) ) { |
9 | 105 |
?> |
106 |
<# |
|
107 |
if ( ! _.isUndefined( data.model.<?php echo $key; ?> ) && data.model.<?php echo $key; ?> ) { |
|
108 |
#> <?php echo $key; ?>="{{ data.model.<?php echo $key; ?> }}"<# |
|
5 | 109 |
} #> |
9 | 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 |
|
5 | 116 |
} |
117 |
endforeach; |
|
9 | 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; ?><# |
|
5 | 125 |
} |
126 |
<?php endforeach ?>#> |
|
127 |
> |
|
128 |
<# if ( ! _.isEmpty( data.model.src ) ) { |
|
129 |
if ( isYouTube ) { #> |
|
130 |
<source src="{{ data.model.src }}" type="video/youtube" /> |
|
131 |
<# } else if ( isVimeo ) { #> |
|
132 |
<source src="{{ data.model.src }}" type="video/vimeo" /> |
|
133 |
<# } else { #> |
|
134 |
<source src="{{ data.model.src }}" type="{{ settings.embedMimes[ data.model.src.split('.').pop() ] }}" /> |
|
135 |
<# } |
|
136 |
} #> |
|
137 |
||
9 | 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; ?>' ] }}" /> |
|
5 | 143 |
<# } #> |
144 |
<?php endforeach; ?> |
|
145 |
{{{ data.model.content }}} |
|
146 |
</video> |
|
147 |
</div> |
|
9 | 148 |
<?php |
5 | 149 |
} |
150 |
||
151 |
/** |
|
0 | 152 |
* Prints the templates used in the media manager. |
153 |
* |
|
154 |
* @since 3.5.0 |
|
155 |
*/ |
|
156 |
function wp_print_media_templates() { |
|
157 |
$class = 'media-modal wp-core-ui'; |
|
9 | 158 |
|
159 |
$alt_text_description = sprintf( |
|
16 | 160 |
/* translators: 1: Link to tutorial, 2: Additional link attributes, 3: Accessibility text. */ |
9 | 161 |
__( '<a href="%1$s" %2$s>Describe the purpose of the image%3$s</a>. Leave empty if the image is purely decorative.' ), |
162 |
esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ), |
|
18 | 163 |
'target="_blank" rel="noopener"', |
9 | 164 |
sprintf( |
165 |
'<span class="screen-reader-text"> %s</span>', |
|
16 | 166 |
/* translators: Accessibility text. */ |
9 | 167 |
__( '(opens in a new tab)' ) |
168 |
) |
|
169 |
); |
|
0 | 170 |
?> |
16 | 171 |
|
172 |
<?php // Template for the media frame: used both in the media grid and in the media modal. ?> |
|
0 | 173 |
<script type="text/html" id="tmpl-media-frame"> |
9 | 174 |
<div class="media-frame-title" id="media-frame-title"></div> |
16 | 175 |
<h2 class="media-frame-menu-heading"><?php _ex( 'Actions', 'media modal menu actions' ); ?></h2> |
176 |
<button type="button" class="button button-link media-frame-menu-toggle" aria-expanded="false"> |
|
177 |
<?php _ex( 'Menu', 'media modal menu' ); ?> |
|
178 |
<span class="dashicons dashicons-arrow-down" aria-hidden="true"></span> |
|
179 |
</button> |
|
0 | 180 |
<div class="media-frame-menu"></div> |
16 | 181 |
<div class="media-frame-tab-panel"> |
182 |
<div class="media-frame-router"></div> |
|
183 |
<div class="media-frame-content"></div> |
|
184 |
</div> |
|
185 |
<h2 class="media-frame-actions-heading screen-reader-text"> |
|
186 |
<?php |
|
187 |
/* translators: Accessibility text. */ |
|
188 |
_e( 'Selected media actions' ); |
|
189 |
?> |
|
190 |
</h2> |
|
0 | 191 |
<div class="media-frame-toolbar"></div> |
192 |
<div class="media-frame-uploader"></div> |
|
193 |
</script> |
|
194 |
||
16 | 195 |
<?php // Template for the media modal. ?> |
0 | 196 |
<script type="text/html" id="tmpl-media-modal"> |
16 | 197 |
<div tabindex="0" class="<?php echo $class; ?>" role="dialog" aria-labelledby="media-frame-title"> |
9 | 198 |
<# if ( data.hasCloseButton ) { #> |
199 |
<button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></span></button> |
|
200 |
<# } #> |
|
201 |
<div class="media-modal-content" role="document"></div> |
|
0 | 202 |
</div> |
203 |
<div class="media-modal-backdrop"></div> |
|
204 |
</script> |
|
205 |
||
16 | 206 |
<?php // Template for the window uploader, used for example in the media grid. ?> |
0 | 207 |
<script type="text/html" id="tmpl-uploader-window"> |
208 |
<div class="uploader-window-content"> |
|
16 | 209 |
<div class="uploader-editor-title"><?php _e( 'Drop files to upload' ); ?></div> |
0 | 210 |
</div> |
211 |
</script> |
|
212 |
||
16 | 213 |
<?php // Template for the editor uploader. ?> |
5 | 214 |
<script type="text/html" id="tmpl-uploader-editor"> |
215 |
<div class="uploader-editor-content"> |
|
216 |
<div class="uploader-editor-title"><?php _e( 'Drop files to upload' ); ?></div> |
|
217 |
</div> |
|
218 |
</script> |
|
219 |
||
16 | 220 |
<?php // Template for the inline uploader, used for example in the Media Library admin page - Add New. ?> |
0 | 221 |
<script type="text/html" id="tmpl-uploader-inline"> |
222 |
<# var messageClass = data.message ? 'has-upload-message' : 'no-upload-message'; #> |
|
5 | 223 |
<# if ( data.canClose ) { #> |
224 |
<button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close uploader' ); ?></span></button> |
|
225 |
<# } #> |
|
0 | 226 |
<div class="uploader-inline-content {{ messageClass }}"> |
227 |
<# if ( data.message ) { #> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
228 |
<h2 class="upload-message">{{ data.message }}</h2> |
0 | 229 |
<# } #> |
230 |
<?php if ( ! _device_can_upload() ) : ?> |
|
16 | 231 |
<div class="upload-ui"> |
232 |
<h2 class="upload-instructions"><?php _e( 'Your browser cannot upload files' ); ?></h2> |
|
233 |
<p> |
|
234 |
<?php |
|
235 |
printf( |
|
236 |
/* translators: %s: https://apps.wordpress.org/ */ |
|
237 |
__( 'The web browser on your device cannot be used to upload files. You may be able to use the <a href="%s">native app for your device</a> instead.' ), |
|
238 |
'https://apps.wordpress.org/' |
|
239 |
); |
|
240 |
?> |
|
241 |
</p> |
|
242 |
</div> |
|
0 | 243 |
<?php elseif ( is_multisite() && ! is_upload_space_available() ) : ?> |
16 | 244 |
<div class="upload-ui"> |
245 |
<h2 class="upload-instructions"><?php _e( 'Upload Limit Exceeded' ); ?></h2> |
|
246 |
<?php |
|
247 |
/** This action is documented in wp-admin/includes/media.php */ |
|
248 |
do_action( 'upload_ui_over_quota' ); |
|
249 |
?> |
|
250 |
</div> |
|
0 | 251 |
<?php else : ?> |
252 |
<div class="upload-ui"> |
|
16 | 253 |
<h2 class="upload-instructions drop-instructions"><?php _e( 'Drop files to upload' ); ?></h2> |
5 | 254 |
<p class="upload-instructions drop-instructions"><?php _ex( 'or', 'Uploader: Drop files here - or - Select Files' ); ?></p> |
18 | 255 |
<button type="button" class="browser button button-hero" aria-labelledby="post-upload-info"><?php _e( 'Select Files' ); ?></button> |
0 | 256 |
</div> |
257 |
||
258 |
<div class="upload-inline-status"></div> |
|
259 |
||
18 | 260 |
<div class="post-upload-ui" id="post-upload-info"> |
0 | 261 |
<?php |
5 | 262 |
/** This action is documented in wp-admin/includes/media.php */ |
16 | 263 |
do_action( 'pre-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
5 | 264 |
/** This action is documented in wp-admin/includes/media.php */ |
16 | 265 |
do_action( 'pre-plupload-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
0 | 266 |
|
267 |
if ( 10 === remove_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' ) ) { |
|
5 | 268 |
/** This action is documented in wp-admin/includes/media.php */ |
16 | 269 |
do_action( 'post-plupload-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
0 | 270 |
add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' ); |
271 |
} else { |
|
5 | 272 |
/** This action is documented in wp-admin/includes/media.php */ |
16 | 273 |
do_action( 'post-plupload-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
0 | 274 |
} |
275 |
||
5 | 276 |
$max_upload_size = wp_max_upload_size(); |
277 |
if ( ! $max_upload_size ) { |
|
278 |
$max_upload_size = 0; |
|
0 | 279 |
} |
280 |
?> |
|
281 |
||
9 | 282 |
<p class="max-upload-size"> |
283 |
<?php |
|
16 | 284 |
printf( |
285 |
/* translators: %s: Maximum allowed file size. */ |
|
286 |
__( 'Maximum upload file size: %s.' ), |
|
287 |
esc_html( size_format( $max_upload_size ) ) |
|
288 |
); |
|
9 | 289 |
?> |
290 |
</p> |
|
0 | 291 |
|
5 | 292 |
<# if ( data.suggestedWidth && data.suggestedHeight ) { #> |
293 |
<p class="suggested-dimensions"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
294 |
<?php |
16 | 295 |
/* translators: 1: Suggested width number, 2: Suggested height number. */ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
296 |
printf( __( 'Suggested image dimensions: %1$s by %2$s pixels.' ), '{{data.suggestedWidth}}', '{{data.suggestedHeight}}' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
297 |
?> |
5 | 298 |
</p> |
299 |
<# } #> |
|
0 | 300 |
|
5 | 301 |
<?php |
302 |
/** This action is documented in wp-admin/includes/media.php */ |
|
16 | 303 |
do_action( 'post-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
9 | 304 |
?> |
0 | 305 |
</div> |
306 |
<?php endif; ?> |
|
307 |
</div> |
|
308 |
</script> |
|
309 |
||
16 | 310 |
<?php // Template for the view switchers, used for example in the Media Grid. ?> |
5 | 311 |
<script type="text/html" id="tmpl-media-library-view-switcher"> |
18 | 312 |
<a href="<?php echo esc_url( add_query_arg( 'mode', 'list', admin_url( 'upload.php' ) ) ); ?>" class="view-list"> |
16 | 313 |
<span class="screen-reader-text"><?php _e( 'List view' ); ?></span> |
5 | 314 |
</a> |
18 | 315 |
<a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', admin_url( 'upload.php' ) ) ); ?>" class="view-grid current" aria-current="page"> |
16 | 316 |
<span class="screen-reader-text"><?php _e( 'Grid view' ); ?></span> |
5 | 317 |
</a> |
318 |
</script> |
|
319 |
||
16 | 320 |
<?php // Template for the uploading status UI. ?> |
0 | 321 |
<script type="text/html" id="tmpl-uploader-status"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
322 |
<h2><?php _e( 'Uploading' ); ?></h2> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
323 |
<button type="button" class="button-link upload-dismiss-errors"><span class="screen-reader-text"><?php _e( 'Dismiss Errors' ); ?></span></button> |
0 | 324 |
|
325 |
<div class="media-progress-bar"><div></div></div> |
|
326 |
<div class="upload-details"> |
|
327 |
<span class="upload-count"> |
|
328 |
<span class="upload-index"></span> / <span class="upload-total"></span> |
|
329 |
</span> |
|
330 |
<span class="upload-detail-separator">–</span> |
|
331 |
<span class="upload-filename"></span> |
|
332 |
</div> |
|
333 |
<div class="upload-errors"></div> |
|
334 |
</script> |
|
335 |
||
16 | 336 |
<?php // Template for the uploading status errors. ?> |
0 | 337 |
<script type="text/html" id="tmpl-uploader-status-error"> |
338 |
<span class="upload-error-filename">{{{ data.filename }}}</span> |
|
339 |
<span class="upload-error-message">{{ data.message }}</span> |
|
340 |
</script> |
|
341 |
||
16 | 342 |
<?php // Template for the Attachment Details layout in the media browser. ?> |
5 | 343 |
<script type="text/html" id="tmpl-edit-attachment-frame"> |
344 |
<div class="edit-media-header"> |
|
16 | 345 |
<button class="left dashicons"<# if ( ! data.hasPrevious ) { #> disabled<# } #>><span class="screen-reader-text"><?php _e( 'Edit previous media item' ); ?></span></button> |
346 |
<button class="right dashicons"<# if ( ! data.hasNext ) { #> disabled<# } #>><span class="screen-reader-text"><?php _e( 'Edit next media item' ); ?></span></button> |
|
9 | 347 |
<button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></span></button> |
5 | 348 |
</div> |
349 |
<div class="media-frame-title"></div> |
|
350 |
<div class="media-frame-content"></div> |
|
351 |
</script> |
|
352 |
||
16 | 353 |
<?php // Template for the Attachment Details two columns layout. ?> |
5 | 354 |
<script type="text/html" id="tmpl-attachment-details-two-column"> |
355 |
<div class="attachment-media-view {{ data.orientation }}"> |
|
16 | 356 |
<h2 class="screen-reader-text"><?php _e( 'Attachment Preview' ); ?></h2> |
5 | 357 |
<div class="thumbnail thumbnail-{{ data.type }}"> |
358 |
<# if ( data.uploading ) { #> |
|
359 |
<div class="media-progress-bar"><div></div></div> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
360 |
<# } else if ( data.sizes && data.sizes.large ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
361 |
<img class="details-image" src="{{ data.sizes.large.url }}" draggable="false" alt="" /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
362 |
<# } else if ( data.sizes && data.sizes.full ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
363 |
<img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" alt="" /> |
5 | 364 |
<# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
365 |
<img class="details-image icon" src="{{ data.icon }}" draggable="false" alt="" /> |
5 | 366 |
<# } #> |
367 |
||
368 |
<# if ( 'audio' === data.type ) { #> |
|
18 | 369 |
<div class="wp-media-wrapper wp-audio"> |
5 | 370 |
<audio style="visibility: hidden" controls class="wp-audio-shortcode" width="100%" preload="none"> |
18 | 371 |
<source type="{{ data.mime }}" src="{{ data.url }}" /> |
5 | 372 |
</audio> |
373 |
</div> |
|
374 |
<# } else if ( 'video' === data.type ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
375 |
var w_rule = ''; |
5 | 376 |
if ( data.width ) { |
377 |
w_rule = 'width: ' + data.width + 'px;'; |
|
378 |
} else if ( wp.media.view.settings.contentWidth ) { |
|
379 |
w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;'; |
|
380 |
} |
|
381 |
#> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
382 |
<div style="{{ w_rule }}" class="wp-media-wrapper wp-video"> |
5 | 383 |
<video controls="controls" class="wp-video-shortcode" preload="metadata" |
384 |
<# if ( data.width ) { #>width="{{ data.width }}"<# } #> |
|
385 |
<# if ( data.height ) { #>height="{{ data.height }}"<# } #> |
|
386 |
<# if ( data.image && data.image.src !== data.icon ) { #>poster="{{ data.image.src }}"<# } #>> |
|
18 | 387 |
<source type="{{ data.mime }}" src="{{ data.url }}" /> |
5 | 388 |
</video> |
389 |
</div> |
|
390 |
<# } #> |
|
391 |
||
392 |
<div class="attachment-actions"> |
|
393 |
<# if ( 'image' === data.type && ! data.uploading && data.sizes && data.can.save ) { #> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
394 |
<button type="button" class="button edit-attachment"><?php _e( 'Edit Image' ); ?></button> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
395 |
<# } else if ( 'pdf' === data.subtype && data.sizes ) { #> |
16 | 396 |
<p><?php _e( 'Document Preview' ); ?></p> |
5 | 397 |
<# } #> |
398 |
</div> |
|
399 |
</div> |
|
400 |
</div> |
|
401 |
<div class="attachment-info"> |
|
16 | 402 |
<span class="settings-save-status" role="status"> |
5 | 403 |
<span class="spinner"></span> |
9 | 404 |
<span class="saved"><?php esc_html_e( 'Saved.' ); ?></span> |
5 | 405 |
</span> |
406 |
<div class="details"> |
|
16 | 407 |
<h2 class="screen-reader-text"><?php _e( 'Details' ); ?></h2> |
18 | 408 |
<div class="uploaded"><strong><?php _e( 'Uploaded on:' ); ?></strong> {{ data.dateFormatted }}</div> |
409 |
<div class="uploaded-by"> |
|
410 |
<strong><?php _e( 'Uploaded by:' ); ?></strong> |
|
411 |
<# if ( data.authorLink ) { #> |
|
412 |
<a href="{{ data.authorLink }}">{{ data.authorName }}</a> |
|
413 |
<# } else { #> |
|
414 |
{{ data.authorName }} |
|
415 |
<# } #> |
|
416 |
</div> |
|
417 |
<# if ( data.uploadedToTitle ) { #> |
|
418 |
<div class="uploaded-to"> |
|
419 |
<strong><?php _e( 'Uploaded to:' ); ?></strong> |
|
420 |
<# if ( data.uploadedToLink ) { #> |
|
421 |
<a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a> |
|
422 |
<# } else { #> |
|
423 |
{{ data.uploadedToTitle }} |
|
424 |
<# } #> |
|
425 |
</div> |
|
426 |
<# } #> |
|
5 | 427 |
<div class="filename"><strong><?php _e( 'File name:' ); ?></strong> {{ data.filename }}</div> |
18 | 428 |
<div class="file-type"><strong><?php _e( 'File type:' ); ?></strong> {{ data.mime }}</div> |
5 | 429 |
<div class="file-size"><strong><?php _e( 'File size:' ); ?></strong> {{ data.filesizeHumanReadable }}</div> |
430 |
<# if ( 'image' === data.type && ! data.uploading ) { #> |
|
431 |
<# if ( data.width && data.height ) { #> |
|
9 | 432 |
<div class="dimensions"><strong><?php _e( 'Dimensions:' ); ?></strong> |
433 |
<?php |
|
16 | 434 |
/* translators: 1: A number of pixels wide, 2: A number of pixels tall. */ |
9 | 435 |
printf( __( '%1$s by %2$s pixels' ), '{{ data.width }}', '{{ data.height }}' ); |
436 |
?> |
|
437 |
</div> |
|
5 | 438 |
<# } #> |
16 | 439 |
|
440 |
<# if ( data.originalImageURL && data.originalImageName ) { #> |
|
441 |
<?php _e( 'Original image:' ); ?> |
|
442 |
<a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a> |
|
443 |
<# } #> |
|
5 | 444 |
<# } #> |
445 |
||
9 | 446 |
<# if ( data.fileLength && data.fileLengthHumanReadable ) { #> |
447 |
<div class="file-length"><strong><?php _e( 'Length:' ); ?></strong> |
|
448 |
<span aria-hidden="true">{{ data.fileLength }}</span> |
|
449 |
<span class="screen-reader-text">{{ data.fileLengthHumanReadable }}</span> |
|
450 |
</div> |
|
5 | 451 |
<# } #> |
452 |
||
453 |
<# if ( 'audio' === data.type && data.meta.bitrate ) { #> |
|
454 |
<div class="bitrate"> |
|
455 |
<strong><?php _e( 'Bitrate:' ); ?></strong> {{ Math.round( data.meta.bitrate / 1000 ) }}kb/s |
|
456 |
<# if ( data.meta.bitrate_mode ) { #> |
|
457 |
{{ ' ' + data.meta.bitrate_mode.toUpperCase() }} |
|
458 |
<# } #> |
|
0 | 459 |
</div> |
5 | 460 |
<# } #> |
461 |
||
18 | 462 |
<# if ( data.mediaStates ) { #> |
463 |
<div class="media-states"><strong><?php _e( 'Used as:' ); ?></strong> {{ data.mediaStates }}</div> |
|
464 |
<# } #> |
|
465 |
||
5 | 466 |
<div class="compat-meta"> |
467 |
<# if ( data.compat && data.compat.meta ) { #> |
|
468 |
{{{ data.compat.meta }}} |
|
469 |
<# } #> |
|
0 | 470 |
</div> |
5 | 471 |
</div> |
0 | 472 |
|
5 | 473 |
<div class="settings"> |
474 |
<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #> |
|
9 | 475 |
<# if ( 'image' === data.type ) { #> |
16 | 476 |
<span class="setting has-description" data-setting="alt"> |
477 |
<label for="attachment-details-two-column-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label> |
|
478 |
<input type="text" id="attachment-details-two-column-alt-text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} /> |
|
479 |
</span> |
|
9 | 480 |
<p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p> |
481 |
<# } #> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
482 |
<?php if ( post_type_supports( 'attachment', 'title' ) ) : ?> |
16 | 483 |
<span class="setting" data-setting="title"> |
484 |
<label for="attachment-details-two-column-title" class="name"><?php _e( 'Title' ); ?></label> |
|
485 |
<input type="text" id="attachment-details-two-column-title" value="{{ data.title }}" {{ maybeReadOnly }} /> |
|
486 |
</span> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
487 |
<?php endif; ?> |
5 | 488 |
<# if ( 'audio' === data.type ) { #> |
9 | 489 |
<?php |
490 |
foreach ( array( |
|
5 | 491 |
'artist' => __( 'Artist' ), |
9 | 492 |
'album' => __( 'Album' ), |
493 |
) as $key => $label ) : |
|
494 |
?> |
|
16 | 495 |
<span class="setting" data-setting="<?php echo esc_attr( $key ); ?>"> |
496 |
<label for="attachment-details-two-column-<?php echo esc_attr( $key ); ?>" class="name"><?php echo $label; ?></label> |
|
497 |
<input type="text" id="attachment-details-two-column-<?php echo esc_attr( $key ); ?>" value="{{ data.<?php echo $key; ?> || data.meta.<?php echo $key; ?> || '' }}" /> |
|
498 |
</span> |
|
5 | 499 |
<?php endforeach; ?> |
500 |
<# } #> |
|
16 | 501 |
<span class="setting" data-setting="caption"> |
502 |
<label for="attachment-details-two-column-caption" class="name"><?php _e( 'Caption' ); ?></label> |
|
503 |
<textarea id="attachment-details-two-column-caption" {{ maybeReadOnly }}>{{ data.caption }}</textarea> |
|
504 |
</span> |
|
505 |
<span class="setting" data-setting="description"> |
|
506 |
<label for="attachment-details-two-column-description" class="name"><?php _e( 'Description' ); ?></label> |
|
507 |
<textarea id="attachment-details-two-column-description" {{ maybeReadOnly }}>{{ data.description }}</textarea> |
|
508 |
</span> |
|
509 |
<span class="setting" data-setting="url"> |
|
510 |
<label for="attachment-details-two-column-copy-link" class="name"><?php _e( 'File URL:' ); ?></label> |
|
511 |
<input type="text" class="attachment-details-copy-link" id="attachment-details-two-column-copy-link" value="{{ data.url }}" readonly /> |
|
512 |
<span class="copy-to-clipboard-container"> |
|
18 | 513 |
<button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-two-column-copy-link"><?php _e( 'Copy URL to clipboard' ); ?></button> |
16 | 514 |
<span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span> |
515 |
</span> |
|
516 |
</span> |
|
5 | 517 |
<div class="attachment-compat"></div> |
518 |
</div> |
|
519 |
||
520 |
<div class="actions"> |
|
18 | 521 |
<# if ( data.link ) { #> |
522 |
<a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a> |
|
523 |
<# } #> |
|
524 |
<# if ( data.can.save ) { #> |
|
525 |
<# if ( data.link ) { #> |
|
526 |
<span class="links-separator">|</span> |
|
527 |
<# } #> |
|
9 | 528 |
<a href="{{ data.editLink }}"><?php _e( 'Edit more details' ); ?></a> |
5 | 529 |
<# } #> |
18 | 530 |
<# if ( ! data.uploading && data.can.remove ) { #> |
531 |
<# if ( data.link || data.can.save ) { #> |
|
532 |
<span class="links-separator">|</span> |
|
533 |
<# } #> |
|
9 | 534 |
<?php if ( MEDIA_TRASH ) : ?> |
5 | 535 |
<# if ( 'trash' === data.status ) { #> |
9 | 536 |
<button type="button" class="button-link untrash-attachment"><?php _e( 'Restore from Trash' ); ?></button> |
5 | 537 |
<# } else { #> |
9 | 538 |
<button type="button" class="button-link trash-attachment"><?php _e( 'Move to Trash' ); ?></button> |
5 | 539 |
<# } #> |
9 | 540 |
<?php else : ?> |
16 | 541 |
<button type="button" class="button-link delete-attachment"><?php _e( 'Delete permanently' ); ?></button> |
5 | 542 |
<?php endif; ?> |
543 |
<# } #> |
|
544 |
</div> |
|
545 |
</div> |
|
546 |
</script> |
|
547 |
||
16 | 548 |
<?php // Template for the Attachment "thumbnails" in the Media Grid. ?> |
5 | 549 |
<script type="text/html" id="tmpl-attachment"> |
550 |
<div class="attachment-preview js--select-attachment type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}"> |
|
551 |
<div class="thumbnail"> |
|
552 |
<# if ( data.uploading ) { #> |
|
553 |
<div class="media-progress-bar"><div style="width: {{ data.percent }}%"></div></div> |
|
18 | 554 |
<# } else if ( 'image' === data.type && data.size && data.size.url ) { #> |
5 | 555 |
<div class="centered"> |
556 |
<img src="{{ data.size.url }}" draggable="false" alt="" /> |
|
557 |
</div> |
|
558 |
<# } else { #> |
|
559 |
<div class="centered"> |
|
560 |
<# if ( data.image && data.image.src && data.image.src !== data.icon ) { #> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
561 |
<img src="{{ data.image.src }}" class="thumbnail" draggable="false" alt="" /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
562 |
<# } else if ( data.sizes && data.sizes.medium ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
563 |
<img src="{{ data.sizes.medium.url }}" class="thumbnail" draggable="false" alt="" /> |
5 | 564 |
<# } else { #> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
565 |
<img src="{{ data.icon }}" class="icon" draggable="false" alt="" /> |
5 | 566 |
<# } #> |
567 |
</div> |
|
568 |
<div class="filename"> |
|
569 |
<div>{{ data.filename }}</div> |
|
570 |
</div> |
|
571 |
<# } #> |
|
572 |
</div> |
|
0 | 573 |
<# if ( data.buttons.close ) { #> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
574 |
<button type="button" class="button-link attachment-close media-modal-icon"><span class="screen-reader-text"><?php _e( 'Remove' ); ?></span></button> |
0 | 575 |
<# } #> |
576 |
</div> |
|
5 | 577 |
<# if ( data.buttons.check ) { #> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
578 |
<button type="button" class="check" tabindex="-1"><span class="media-modal-icon"></span><span class="screen-reader-text"><?php _e( 'Deselect' ); ?></span></button> |
5 | 579 |
<# } #> |
0 | 580 |
<# |
581 |
var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; |
|
5 | 582 |
if ( data.describe ) { |
583 |
if ( 'image' === data.type ) { #> |
|
0 | 584 |
<input type="text" value="{{ data.caption }}" class="describe" data-setting="caption" |
16 | 585 |
aria-label="<?php esc_attr_e( 'Caption' ); ?>" |
586 |
placeholder="<?php esc_attr_e( 'Caption…' ); ?>" {{ maybeReadOnly }} /> |
|
0 | 587 |
<# } else { #> |
588 |
<input type="text" value="{{ data.title }}" class="describe" data-setting="title" |
|
589 |
<# if ( 'video' === data.type ) { #> |
|
16 | 590 |
aria-label="<?php esc_attr_e( 'Video title' ); ?>" |
591 |
placeholder="<?php esc_attr_e( 'Video title…' ); ?>" |
|
0 | 592 |
<# } else if ( 'audio' === data.type ) { #> |
16 | 593 |
aria-label="<?php esc_attr_e( 'Audio title' ); ?>" |
594 |
placeholder="<?php esc_attr_e( 'Audio title…' ); ?>" |
|
0 | 595 |
<# } else { #> |
16 | 596 |
aria-label="<?php esc_attr_e( 'Media title' ); ?>" |
597 |
placeholder="<?php esc_attr_e( 'Media title…' ); ?>" |
|
0 | 598 |
<# } #> {{ maybeReadOnly }} /> |
5 | 599 |
<# } |
600 |
} #> |
|
0 | 601 |
</script> |
602 |
||
16 | 603 |
<?php // Template for the Attachment details, used for example in the sidebar. ?> |
0 | 604 |
<script type="text/html" id="tmpl-attachment-details"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
605 |
<h2> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
606 |
<?php _e( 'Attachment Details' ); ?> |
16 | 607 |
<span class="settings-save-status" role="status"> |
0 | 608 |
<span class="spinner"></span> |
9 | 609 |
<span class="saved"><?php esc_html_e( 'Saved.' ); ?></span> |
0 | 610 |
</span> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
611 |
</h2> |
0 | 612 |
<div class="attachment-info"> |
18 | 613 |
|
614 |
<# if ( 'audio' === data.type ) { #> |
|
615 |
<div class="wp-media-wrapper wp-audio"> |
|
616 |
<audio style="visibility: hidden" controls class="wp-audio-shortcode" width="100%" preload="none"> |
|
617 |
<source type="{{ data.mime }}" src="{{ data.url }}" /> |
|
618 |
</audio> |
|
619 |
</div> |
|
620 |
<# } else if ( 'video' === data.type ) { |
|
621 |
var w_rule = ''; |
|
622 |
if ( data.width ) { |
|
623 |
w_rule = 'width: ' + data.width + 'px;'; |
|
624 |
} else if ( wp.media.view.settings.contentWidth ) { |
|
625 |
w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;'; |
|
626 |
} |
|
627 |
#> |
|
628 |
<div style="{{ w_rule }}" class="wp-media-wrapper wp-video"> |
|
629 |
<video controls="controls" class="wp-video-shortcode" preload="metadata" |
|
630 |
<# if ( data.width ) { #>width="{{ data.width }}"<# } #> |
|
631 |
<# if ( data.height ) { #>height="{{ data.height }}"<# } #> |
|
632 |
<# if ( data.image && data.image.src !== data.icon ) { #>poster="{{ data.image.src }}"<# } #>> |
|
633 |
<source type="{{ data.mime }}" src="{{ data.url }}" /> |
|
634 |
</video> |
|
635 |
</div> |
|
636 |
<# } else { #> |
|
637 |
<div class="thumbnail thumbnail-{{ data.type }}"> |
|
638 |
<# if ( data.uploading ) { #> |
|
639 |
<div class="media-progress-bar"><div></div></div> |
|
640 |
<# } else if ( 'image' === data.type && data.size && data.size.url ) { #> |
|
641 |
<img src="{{ data.size.url }}" draggable="false" alt="" /> |
|
642 |
<# } else { #> |
|
643 |
<img src="{{ data.icon }}" class="icon" draggable="false" alt="" /> |
|
644 |
<# } #> |
|
645 |
</div> |
|
646 |
<# } #> |
|
647 |
||
0 | 648 |
<div class="details"> |
649 |
<div class="filename">{{ data.filename }}</div> |
|
650 |
<div class="uploaded">{{ data.dateFormatted }}</div> |
|
651 |
||
5 | 652 |
<div class="file-size">{{ data.filesizeHumanReadable }}</div> |
0 | 653 |
<# if ( 'image' === data.type && ! data.uploading ) { #> |
654 |
<# if ( data.width && data.height ) { #> |
|
9 | 655 |
<div class="dimensions"> |
656 |
<?php |
|
16 | 657 |
/* translators: 1: A number of pixels wide, 2: A number of pixels tall. */ |
9 | 658 |
printf( __( '%1$s by %2$s pixels' ), '{{ data.width }}', '{{ data.height }}' ); |
659 |
?> |
|
660 |
</div> |
|
0 | 661 |
<# } #> |
662 |
||
16 | 663 |
<# if ( data.originalImageURL && data.originalImageName ) { #> |
664 |
<?php _e( 'Original image:' ); ?> |
|
665 |
<a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a> |
|
666 |
<# } #> |
|
667 |
||
5 | 668 |
<# if ( data.can.save && data.sizes ) { #> |
0 | 669 |
<a class="edit-attachment" href="{{ data.editLink }}&image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a> |
670 |
<# } #> |
|
671 |
<# } #> |
|
672 |
||
9 | 673 |
<# if ( data.fileLength && data.fileLengthHumanReadable ) { #> |
674 |
<div class="file-length"><?php _e( 'Length:' ); ?> |
|
675 |
<span aria-hidden="true">{{ data.fileLength }}</span> |
|
676 |
<span class="screen-reader-text">{{ data.fileLengthHumanReadable }}</span> |
|
677 |
</div> |
|
0 | 678 |
<# } #> |
679 |
||
18 | 680 |
<# if ( data.mediaStates ) { #> |
681 |
<div class="media-states"><strong><?php _e( 'Used as:' ); ?></strong> {{ data.mediaStates }}</div> |
|
682 |
<# } #> |
|
683 |
||
0 | 684 |
<# if ( ! data.uploading && data.can.remove ) { #> |
9 | 685 |
<?php if ( MEDIA_TRASH ) : ?> |
5 | 686 |
<# if ( 'trash' === data.status ) { #> |
9 | 687 |
<button type="button" class="button-link untrash-attachment"><?php _e( 'Restore from Trash' ); ?></button> |
5 | 688 |
<# } else { #> |
9 | 689 |
<button type="button" class="button-link trash-attachment"><?php _e( 'Move to Trash' ); ?></button> |
5 | 690 |
<# } #> |
9 | 691 |
<?php else : ?> |
16 | 692 |
<button type="button" class="button-link delete-attachment"><?php _e( 'Delete permanently' ); ?></button> |
5 | 693 |
<?php endif; ?> |
0 | 694 |
<# } #> |
695 |
||
696 |
<div class="compat-meta"> |
|
697 |
<# if ( data.compat && data.compat.meta ) { #> |
|
698 |
{{{ data.compat.meta }}} |
|
699 |
<# } #> |
|
700 |
</div> |
|
701 |
</div> |
|
702 |
</div> |
|
703 |
<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #> |
|
9 | 704 |
<# if ( 'image' === data.type ) { #> |
16 | 705 |
<span class="setting has-description" data-setting="alt"> |
706 |
<label for="attachment-details-alt-text" class="name"><?php _e( 'Alt Text' ); ?></label> |
|
707 |
<input type="text" id="attachment-details-alt-text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} /> |
|
708 |
</span> |
|
9 | 709 |
<p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p> |
710 |
<# } #> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
711 |
<?php if ( post_type_supports( 'attachment', 'title' ) ) : ?> |
16 | 712 |
<span class="setting" data-setting="title"> |
713 |
<label for="attachment-details-title" class="name"><?php _e( 'Title' ); ?></label> |
|
714 |
<input type="text" id="attachment-details-title" value="{{ data.title }}" {{ maybeReadOnly }} /> |
|
715 |
</span> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
716 |
<?php endif; ?> |
5 | 717 |
<# if ( 'audio' === data.type ) { #> |
9 | 718 |
<?php |
719 |
foreach ( array( |
|
5 | 720 |
'artist' => __( 'Artist' ), |
9 | 721 |
'album' => __( 'Album' ), |
722 |
) as $key => $label ) : |
|
723 |
?> |
|
16 | 724 |
<span class="setting" data-setting="<?php echo esc_attr( $key ); ?>"> |
725 |
<label for="attachment-details-<?php echo esc_attr( $key ); ?>" class="name"><?php echo $label; ?></label> |
|
726 |
<input type="text" id="attachment-details-<?php echo esc_attr( $key ); ?>" value="{{ data.<?php echo $key; ?> || data.meta.<?php echo $key; ?> || '' }}" /> |
|
727 |
</span> |
|
5 | 728 |
<?php endforeach; ?> |
729 |
<# } #> |
|
16 | 730 |
<span class="setting" data-setting="caption"> |
731 |
<label for="attachment-details-caption" class="name"><?php _e( 'Caption' ); ?></label> |
|
732 |
<textarea id="attachment-details-caption" {{ maybeReadOnly }}>{{ data.caption }}</textarea> |
|
733 |
</span> |
|
734 |
<span class="setting" data-setting="description"> |
|
735 |
<label for="attachment-details-description" class="name"><?php _e( 'Description' ); ?></label> |
|
736 |
<textarea id="attachment-details-description" {{ maybeReadOnly }}>{{ data.description }}</textarea> |
|
737 |
</span> |
|
738 |
<span class="setting" data-setting="url"> |
|
739 |
<label for="attachment-details-copy-link" class="name"><?php _e( 'File URL:' ); ?></label> |
|
740 |
<input type="text" class="attachment-details-copy-link" id="attachment-details-copy-link" value="{{ data.url }}" readonly /> |
|
741 |
<div class="copy-to-clipboard-container"> |
|
18 | 742 |
<button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-copy-link"><?php _e( 'Copy URL to clipboard' ); ?></button> |
16 | 743 |
<span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span> |
744 |
</div> |
|
745 |
</span> |
|
0 | 746 |
</script> |
747 |
||
16 | 748 |
<?php // Template for the Selection status bar. ?> |
0 | 749 |
<script type="text/html" id="tmpl-media-selection"> |
750 |
<div class="selection-info"> |
|
751 |
<span class="count"></span> |
|
752 |
<# if ( data.editable ) { #> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
753 |
<button type="button" class="button-link edit-selection"><?php _e( 'Edit Selection' ); ?></button> |
0 | 754 |
<# } #> |
755 |
<# if ( data.clearable ) { #> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
756 |
<button type="button" class="button-link clear-selection"><?php _e( 'Clear' ); ?></button> |
0 | 757 |
<# } #> |
758 |
</div> |
|
759 |
<div class="selection-view"></div> |
|
760 |
</script> |
|
761 |
||
16 | 762 |
<?php // Template for the Attachment display settings, used for example in the sidebar. ?> |
0 | 763 |
<script type="text/html" id="tmpl-attachment-display-settings"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
764 |
<h2><?php _e( 'Attachment Display Settings' ); ?></h2> |
0 | 765 |
|
766 |
<# if ( 'image' === data.type ) { #> |
|
16 | 767 |
<span class="setting align"> |
768 |
<label for="attachment-display-settings-alignment" class="name"><?php _e( 'Alignment' ); ?></label> |
|
769 |
<select id="attachment-display-settings-alignment" class="alignment" |
|
0 | 770 |
data-setting="align" |
771 |
<# if ( data.userSettings ) { #> |
|
772 |
data-user-setting="align" |
|
773 |
<# } #>> |
|
774 |
||
775 |
<option value="left"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
776 |
<?php esc_html_e( 'Left' ); ?> |
0 | 777 |
</option> |
778 |
<option value="center"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
779 |
<?php esc_html_e( 'Center' ); ?> |
0 | 780 |
</option> |
781 |
<option value="right"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
782 |
<?php esc_html_e( 'Right' ); ?> |
0 | 783 |
</option> |
784 |
<option value="none" selected> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
785 |
<?php esc_html_e( 'None' ); ?> |
0 | 786 |
</option> |
787 |
</select> |
|
16 | 788 |
</span> |
0 | 789 |
<# } #> |
790 |
||
16 | 791 |
<span class="setting"> |
792 |
<label for="attachment-display-settings-link-to" class="name"> |
|
0 | 793 |
<# if ( data.model.canEmbed ) { #> |
16 | 794 |
<?php _e( 'Embed or Link' ); ?> |
0 | 795 |
<# } else { #> |
16 | 796 |
<?php _e( 'Link To' ); ?> |
0 | 797 |
<# } #> |
16 | 798 |
</label> |
799 |
<select id="attachment-display-settings-link-to" class="link-to" |
|
800 |
data-setting="link" |
|
801 |
<# if ( data.userSettings && ! data.model.canEmbed ) { #> |
|
802 |
data-user-setting="urlbutton" |
|
803 |
<# } #>> |
|
804 |
||
805 |
<# if ( data.model.canEmbed ) { #> |
|
806 |
<option value="embed" selected> |
|
807 |
<?php esc_html_e( 'Embed Media Player' ); ?> |
|
808 |
</option> |
|
809 |
<option value="file"> |
|
810 |
<# } else { #> |
|
811 |
<option value="none" selected> |
|
812 |
<?php esc_html_e( 'None' ); ?> |
|
813 |
</option> |
|
814 |
<option value="file"> |
|
815 |
<# } #> |
|
816 |
<# if ( data.model.canEmbed ) { #> |
|
817 |
<?php esc_html_e( 'Link to Media File' ); ?> |
|
818 |
<# } else { #> |
|
819 |
<?php esc_html_e( 'Media File' ); ?> |
|
0 | 820 |
<# } #> |
16 | 821 |
</option> |
822 |
<option value="post"> |
|
823 |
<# if ( data.model.canEmbed ) { #> |
|
824 |
<?php esc_html_e( 'Link to Attachment Page' ); ?> |
|
825 |
<# } else { #> |
|
826 |
<?php esc_html_e( 'Attachment Page' ); ?> |
|
827 |
<# } #> |
|
828 |
</option> |
|
829 |
<# if ( 'image' === data.type ) { #> |
|
830 |
<option value="custom"> |
|
831 |
<?php esc_html_e( 'Custom URL' ); ?> |
|
832 |
</option> |
|
833 |
<# } #> |
|
834 |
</select> |
|
835 |
</span> |
|
836 |
<span class="setting"> |
|
837 |
<label for="attachment-display-settings-link-to-custom" class="name"><?php _e( 'URL' ); ?></label> |
|
838 |
<input type="text" id="attachment-display-settings-link-to-custom" class="link-to-custom" data-setting="linkUrl" /> |
|
839 |
</span> |
|
0 | 840 |
|
841 |
<# if ( 'undefined' !== typeof data.sizes ) { #> |
|
16 | 842 |
<span class="setting"> |
843 |
<label for="attachment-display-settings-size" class="name"><?php _e( 'Size' ); ?></label> |
|
844 |
<select id="attachment-display-settings-size" class="size" name="size" |
|
0 | 845 |
data-setting="size" |
846 |
<# if ( data.userSettings ) { #> |
|
847 |
data-user-setting="imgsize" |
|
848 |
<# } #>> |
|
849 |
<?php |
|
850 |
/** This filter is documented in wp-admin/includes/media.php */ |
|
9 | 851 |
$sizes = apply_filters( |
852 |
'image_size_names_choose', |
|
853 |
array( |
|
854 |
'thumbnail' => __( 'Thumbnail' ), |
|
855 |
'medium' => __( 'Medium' ), |
|
856 |
'large' => __( 'Large' ), |
|
857 |
'full' => __( 'Full Size' ), |
|
858 |
) |
|
859 |
); |
|
0 | 860 |
|
9 | 861 |
foreach ( $sizes as $value => $name ) : |
862 |
?> |
|
0 | 863 |
<# |
864 |
var size = data.sizes['<?php echo esc_js( $value ); ?>']; |
|
865 |
if ( size ) { #> |
|
866 |
<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'full' ); ?>> |
|
867 |
<?php echo esc_html( $name ); ?> – {{ size.width }} × {{ size.height }} |
|
868 |
</option> |
|
869 |
<# } #> |
|
870 |
<?php endforeach; ?> |
|
871 |
</select> |
|
16 | 872 |
</span> |
0 | 873 |
<# } #> |
874 |
</script> |
|
875 |
||
16 | 876 |
<?php // Template for the Gallery settings, used for example in the sidebar. ?> |
0 | 877 |
<script type="text/html" id="tmpl-gallery-settings"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
878 |
<h2><?php _e( 'Gallery Settings' ); ?></h2> |
0 | 879 |
|
16 | 880 |
<span class="setting"> |
881 |
<label for="gallery-settings-link-to" class="name"><?php _e( 'Link To' ); ?></label> |
|
882 |
<select id="gallery-settings-link-to" class="link-to" |
|
0 | 883 |
data-setting="link" |
884 |
<# if ( data.userSettings ) { #> |
|
885 |
data-user-setting="urlbutton" |
|
886 |
<# } #>> |
|
887 |
||
16 | 888 |
<option value="post" <# if ( ! wp.media.galleryDefaults.link || 'post' === wp.media.galleryDefaults.link ) { |
5 | 889 |
#>selected="selected"<# } |
890 |
#>> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
891 |
<?php esc_html_e( 'Attachment Page' ); ?> |
0 | 892 |
</option> |
16 | 893 |
<option value="file" <# if ( 'file' === wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
894 |
<?php esc_html_e( 'Media File' ); ?> |
0 | 895 |
</option> |
16 | 896 |
<option value="none" <# if ( 'none' === wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
897 |
<?php esc_html_e( 'None' ); ?> |
0 | 898 |
</option> |
899 |
</select> |
|
16 | 900 |
</span> |
0 | 901 |
|
16 | 902 |
<span class="setting"> |
903 |
<label for="gallery-settings-columns" class="name select-label-inline"><?php _e( 'Columns' ); ?></label> |
|
904 |
<select id="gallery-settings-columns" class="columns" name="columns" |
|
0 | 905 |
data-setting="columns"> |
906 |
<?php for ( $i = 1; $i <= 9; $i++ ) : ?> |
|
5 | 907 |
<option value="<?php echo esc_attr( $i ); ?>" <# |
9 | 908 |
if ( <?php echo $i; ?> == wp.media.galleryDefaults.columns ) { #>selected="selected"<# } |
5 | 909 |
#>> |
0 | 910 |
<?php echo esc_html( $i ); ?> |
911 |
</option> |
|
912 |
<?php endfor; ?> |
|
913 |
</select> |
|
16 | 914 |
</span> |
0 | 915 |
|
16 | 916 |
<span class="setting"> |
917 |
<input type="checkbox" id="gallery-settings-random-order" data-setting="_orderbyRandom" /> |
|
918 |
<label for="gallery-settings-random-order" class="checkbox-label-inline"><?php _e( 'Random Order' ); ?></label> |
|
919 |
</span> |
|
5 | 920 |
|
16 | 921 |
<span class="setting size"> |
922 |
<label for="gallery-settings-size" class="name"><?php _e( 'Size' ); ?></label> |
|
923 |
<select id="gallery-settings-size" class="size" name="size" |
|
5 | 924 |
data-setting="size" |
925 |
<# if ( data.userSettings ) { #> |
|
926 |
data-user-setting="imgsize" |
|
927 |
<# } #> |
|
928 |
> |
|
929 |
<?php |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
930 |
/** This filter is documented in wp-admin/includes/media.php */ |
9 | 931 |
$size_names = apply_filters( |
932 |
'image_size_names_choose', |
|
933 |
array( |
|
934 |
'thumbnail' => __( 'Thumbnail' ), |
|
935 |
'medium' => __( 'Medium' ), |
|
936 |
'large' => __( 'Large' ), |
|
937 |
'full' => __( 'Full Size' ), |
|
938 |
) |
|
939 |
); |
|
5 | 940 |
|
9 | 941 |
foreach ( $size_names as $size => $label ) : |
942 |
?> |
|
5 | 943 |
<option value="<?php echo esc_attr( $size ); ?>"> |
944 |
<?php echo esc_html( $label ); ?> |
|
945 |
</option> |
|
946 |
<?php endforeach; ?> |
|
947 |
</select> |
|
16 | 948 |
</span> |
5 | 949 |
</script> |
950 |
||
16 | 951 |
<?php // Template for the Playlists settings, used for example in the sidebar. ?> |
5 | 952 |
<script type="text/html" id="tmpl-playlist-settings"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
953 |
<h2><?php _e( 'Playlist Settings' ); ?></h2> |
5 | 954 |
|
955 |
<# var emptyModel = _.isEmpty( data.model ), |
|
956 |
isVideo = 'video' === data.controller.get('library').props.get('type'); #> |
|
957 |
||
16 | 958 |
<span class="setting"> |
959 |
<input type="checkbox" id="playlist-settings-show-list" data-setting="tracklist" <# if ( emptyModel ) { #> |
|
5 | 960 |
checked="checked" |
961 |
<# } #> /> |
|
16 | 962 |
<label for="playlist-settings-show-list" class="checkbox-label-inline"> |
963 |
<# if ( isVideo ) { #> |
|
964 |
<?php _e( 'Show Video List' ); ?> |
|
965 |
<# } else { #> |
|
966 |
<?php _e( 'Show Tracklist' ); ?> |
|
967 |
<# } #> |
|
968 |
</label> |
|
969 |
</span> |
|
5 | 970 |
|
971 |
<# if ( ! isVideo ) { #> |
|
16 | 972 |
<span class="setting"> |
973 |
<input type="checkbox" id="playlist-settings-show-artist" data-setting="artists" <# if ( emptyModel ) { #> |
|
5 | 974 |
checked="checked" |
975 |
<# } #> /> |
|
16 | 976 |
<label for="playlist-settings-show-artist" class="checkbox-label-inline"> |
977 |
<?php _e( 'Show Artist Name in Tracklist' ); ?> |
|
978 |
</label> |
|
979 |
</span> |
|
5 | 980 |
<# } #> |
981 |
||
16 | 982 |
<span class="setting"> |
983 |
<input type="checkbox" id="playlist-settings-show-images" data-setting="images" <# if ( emptyModel ) { #> |
|
5 | 984 |
checked="checked" |
985 |
<# } #> /> |
|
16 | 986 |
<label for="playlist-settings-show-images" class="checkbox-label-inline"> |
987 |
<?php _e( 'Show Images' ); ?> |
|
988 |
</label> |
|
989 |
</span> |
|
0 | 990 |
</script> |
991 |
||
16 | 992 |
<?php // Template for the "Insert from URL" layout. ?> |
0 | 993 |
<script type="text/html" id="tmpl-embed-link-settings"> |
16 | 994 |
<span class="setting link-text"> |
995 |
<label for="embed-link-settings-link-text" class="name"><?php _e( 'Link Text' ); ?></label> |
|
996 |
<input type="text" id="embed-link-settings-link-text" class="alignment" data-setting="linkText" /> |
|
997 |
</span> |
|
5 | 998 |
<div class="embed-container" style="display: none;"> |
999 |
<div class="embed-preview"></div> |
|
1000 |
</div> |
|
0 | 1001 |
</script> |
1002 |
||
16 | 1003 |
<?php // Template for the "Insert from URL" image preview and details. ?> |
0 | 1004 |
<script type="text/html" id="tmpl-embed-image-settings"> |
16 | 1005 |
<div class="wp-clearfix"> |
1006 |
<div class="thumbnail"> |
|
1007 |
<img src="{{ data.model.url }}" draggable="false" alt="" /> |
|
1008 |
</div> |
|
0 | 1009 |
</div> |
1010 |
||
16 | 1011 |
<span class="setting alt-text has-description"> |
1012 |
<label for="embed-image-settings-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label> |
|
1013 |
<input type="text" id="embed-image-settings-alt-text" data-setting="alt" aria-describedby="alt-text-description" /> |
|
1014 |
</span> |
|
9 | 1015 |
<p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p> |
1016 |
||
5 | 1017 |
<?php |
1018 |
/** This filter is documented in wp-admin/includes/media.php */ |
|
9 | 1019 |
if ( ! apply_filters( 'disable_captions', '' ) ) : |
1020 |
?> |
|
16 | 1021 |
<span class="setting caption"> |
1022 |
<label for="embed-image-settings-caption" class="name"><?php _e( 'Caption' ); ?></label> |
|
18 | 1023 |
<textarea id="embed-image-settings-caption" data-setting="caption"></textarea> |
16 | 1024 |
</span> |
0 | 1025 |
<?php endif; ?> |
1026 |
||
16 | 1027 |
<fieldset class="setting-group"> |
1028 |
<legend class="name"><?php _e( 'Align' ); ?></legend> |
|
1029 |
<span class="setting align"> |
|
1030 |
<span class="button-group button-large" data-setting="align"> |
|
1031 |
<button class="button" value="left"> |
|
1032 |
<?php esc_html_e( 'Left' ); ?> |
|
1033 |
</button> |
|
1034 |
<button class="button" value="center"> |
|
1035 |
<?php esc_html_e( 'Center' ); ?> |
|
1036 |
</button> |
|
1037 |
<button class="button" value="right"> |
|
1038 |
<?php esc_html_e( 'Right' ); ?> |
|
1039 |
</button> |
|
1040 |
<button class="button active" value="none"> |
|
1041 |
<?php esc_html_e( 'None' ); ?> |
|
1042 |
</button> |
|
1043 |
</span> |
|
1044 |
</span> |
|
1045 |
</fieldset> |
|
0 | 1046 |
|
16 | 1047 |
<fieldset class="setting-group"> |
1048 |
<legend class="name"><?php _e( 'Link To' ); ?></legend> |
|
1049 |
<span class="setting link-to"> |
|
1050 |
<span class="button-group button-large" data-setting="link"> |
|
1051 |
<button class="button" value="file"> |
|
1052 |
<?php esc_html_e( 'Image URL' ); ?> |
|
1053 |
</button> |
|
1054 |
<button class="button" value="custom"> |
|
1055 |
<?php esc_html_e( 'Custom URL' ); ?> |
|
1056 |
</button> |
|
1057 |
<button class="button active" value="none"> |
|
1058 |
<?php esc_html_e( 'None' ); ?> |
|
1059 |
</button> |
|
1060 |
</span> |
|
1061 |
</span> |
|
1062 |
<span class="setting"> |
|
1063 |
<label for="embed-image-settings-link-to-custom" class="name"><?php _e( 'URL' ); ?></label> |
|
1064 |
<input type="text" id="embed-image-settings-link-to-custom" class="link-to-custom" data-setting="linkUrl" /> |
|
1065 |
</span> |
|
1066 |
</fieldset> |
|
0 | 1067 |
</script> |
1068 |
||
16 | 1069 |
<?php // Template for the Image details, used for example in the editor. ?> |
5 | 1070 |
<script type="text/html" id="tmpl-image-details"> |
1071 |
<div class="media-embed"> |
|
1072 |
<div class="embed-media-settings"> |
|
1073 |
<div class="column-settings"> |
|
16 | 1074 |
<span class="setting alt-text has-description"> |
1075 |
<label for="image-details-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label> |
|
1076 |
<input type="text" id="image-details-alt-text" data-setting="alt" value="{{ data.model.alt }}" aria-describedby="alt-text-description" /> |
|
1077 |
</span> |
|
9 | 1078 |
<p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p> |
1079 |
||
5 | 1080 |
<?php |
1081 |
/** This filter is documented in wp-admin/includes/media.php */ |
|
9 | 1082 |
if ( ! apply_filters( 'disable_captions', '' ) ) : |
1083 |
?> |
|
16 | 1084 |
<span class="setting caption"> |
1085 |
<label for="image-details-caption" class="name"><?php _e( 'Caption' ); ?></label> |
|
1086 |
<textarea id="image-details-caption" data-setting="caption">{{ data.model.caption }}</textarea> |
|
1087 |
</span> |
|
5 | 1088 |
<?php endif; ?> |
1089 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1090 |
<h2><?php _e( 'Display Settings' ); ?></h2> |
16 | 1091 |
<fieldset class="setting-group"> |
1092 |
<legend class="legend-inline"><?php _e( 'Align' ); ?></legend> |
|
1093 |
<span class="setting align"> |
|
1094 |
<span class="button-group button-large" data-setting="align"> |
|
1095 |
<button class="button" value="left"> |
|
1096 |
<?php esc_html_e( 'Left' ); ?> |
|
1097 |
</button> |
|
1098 |
<button class="button" value="center"> |
|
1099 |
<?php esc_html_e( 'Center' ); ?> |
|
1100 |
</button> |
|
1101 |
<button class="button" value="right"> |
|
1102 |
<?php esc_html_e( 'Right' ); ?> |
|
1103 |
</button> |
|
1104 |
<button class="button active" value="none"> |
|
1105 |
<?php esc_html_e( 'None' ); ?> |
|
1106 |
</button> |
|
1107 |
</span> |
|
1108 |
</span> |
|
1109 |
</fieldset> |
|
5 | 1110 |
|
1111 |
<# if ( data.attachment ) { #> |
|
1112 |
<# if ( 'undefined' !== typeof data.attachment.sizes ) { #> |
|
16 | 1113 |
<span class="setting size"> |
1114 |
<label for="image-details-size" class="name"><?php _e( 'Size' ); ?></label> |
|
1115 |
<select id="image-details-size" class="size" name="size" |
|
5 | 1116 |
data-setting="size" |
1117 |
<# if ( data.userSettings ) { #> |
|
1118 |
data-user-setting="imgsize" |
|
1119 |
<# } #>> |
|
1120 |
<?php |
|
1121 |
/** This filter is documented in wp-admin/includes/media.php */ |
|
9 | 1122 |
$sizes = apply_filters( |
1123 |
'image_size_names_choose', |
|
1124 |
array( |
|
1125 |
'thumbnail' => __( 'Thumbnail' ), |
|
1126 |
'medium' => __( 'Medium' ), |
|
1127 |
'large' => __( 'Large' ), |
|
1128 |
'full' => __( 'Full Size' ), |
|
1129 |
) |
|
1130 |
); |
|
5 | 1131 |
|
9 | 1132 |
foreach ( $sizes as $value => $name ) : |
1133 |
?> |
|
5 | 1134 |
<# |
1135 |
var size = data.sizes['<?php echo esc_js( $value ); ?>']; |
|
1136 |
if ( size ) { #> |
|
1137 |
<option value="<?php echo esc_attr( $value ); ?>"> |
|
1138 |
<?php echo esc_html( $name ); ?> – {{ size.width }} × {{ size.height }} |
|
1139 |
</option> |
|
1140 |
<# } #> |
|
1141 |
<?php endforeach; ?> |
|
1142 |
<option value="<?php echo esc_attr( 'custom' ); ?>"> |
|
1143 |
<?php _e( 'Custom Size' ); ?> |
|
1144 |
</option> |
|
1145 |
</select> |
|
16 | 1146 |
</span> |
5 | 1147 |
<# } #> |
16 | 1148 |
<div class="custom-size wp-clearfix<# if ( data.model.size !== 'custom' ) { #> hidden<# } #>"> |
1149 |
<span class="custom-size-setting"> |
|
1150 |
<label for="image-details-size-width"><?php _e( 'Width' ); ?></label> |
|
1151 |
<input type="number" id="image-details-size-width" aria-describedby="image-size-desc" data-setting="customWidth" step="1" value="{{ data.model.customWidth }}" /> |
|
1152 |
</span> |
|
1153 |
<span class="sep" aria-hidden="true">×</span> |
|
1154 |
<span class="custom-size-setting"> |
|
1155 |
<label for="image-details-size-height"><?php _e( 'Height' ); ?></label> |
|
1156 |
<input type="number" id="image-details-size-height" aria-describedby="image-size-desc" data-setting="customHeight" step="1" value="{{ data.model.customHeight }}" /> |
|
1157 |
</span> |
|
1158 |
<p id="image-size-desc" class="description"><?php _e( 'Image size in pixels' ); ?></p> |
|
5 | 1159 |
</div> |
1160 |
<# } #> |
|
0 | 1161 |
|
16 | 1162 |
<span class="setting link-to"> |
1163 |
<label for="image-details-link-to" class="name"><?php _e( 'Link To' ); ?></label> |
|
1164 |
<select id="image-details-link-to" data-setting="link"> |
|
5 | 1165 |
<# if ( data.attachment ) { #> |
1166 |
<option value="file"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1167 |
<?php esc_html_e( 'Media File' ); ?> |
5 | 1168 |
</option> |
1169 |
<option value="post"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1170 |
<?php esc_html_e( 'Attachment Page' ); ?> |
5 | 1171 |
</option> |
1172 |
<# } else { #> |
|
1173 |
<option value="file"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1174 |
<?php esc_html_e( 'Image URL' ); ?> |
5 | 1175 |
</option> |
1176 |
<# } #> |
|
1177 |
<option value="custom"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1178 |
<?php esc_html_e( 'Custom URL' ); ?> |
5 | 1179 |
</option> |
1180 |
<option value="none"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1181 |
<?php esc_html_e( 'None' ); ?> |
5 | 1182 |
</option> |
1183 |
</select> |
|
16 | 1184 |
</span> |
1185 |
<span class="setting"> |
|
1186 |
<label for="image-details-link-to-custom" class="name"><?php _e( 'URL' ); ?></label> |
|
1187 |
<input type="text" id="image-details-link-to-custom" class="link-to-custom" data-setting="linkUrl" /> |
|
1188 |
</span> |
|
1189 |
||
5 | 1190 |
<div class="advanced-section"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1191 |
<h2><button type="button" class="button-link advanced-toggle"><?php _e( 'Advanced Options' ); ?></button></h2> |
5 | 1192 |
<div class="advanced-settings hidden"> |
1193 |
<div class="advanced-image"> |
|
16 | 1194 |
<span class="setting title-text"> |
1195 |
<label for="image-details-title-attribute" class="name"><?php _e( 'Image Title Attribute' ); ?></label> |
|
1196 |
<input type="text" id="image-details-title-attribute" data-setting="title" value="{{ data.model.title }}" /> |
|
1197 |
</span> |
|
1198 |
<span class="setting extra-classes"> |
|
1199 |
<label for="image-details-css-class" class="name"><?php _e( 'Image CSS Class' ); ?></label> |
|
1200 |
<input type="text" id="image-details-css-class" data-setting="extraClasses" value="{{ data.model.extraClasses }}" /> |
|
1201 |
</span> |
|
5 | 1202 |
</div> |
1203 |
<div class="advanced-link"> |
|
16 | 1204 |
<span class="setting link-target"> |
1205 |
<input type="checkbox" id="image-details-link-target" data-setting="linkTargetBlank" value="_blank" <# if ( data.model.linkTargetBlank ) { #>checked="checked"<# } #>> |
|
1206 |
<label for="image-details-link-target" class="checkbox-label"><?php _e( 'Open link in a new tab' ); ?></label> |
|
1207 |
</span> |
|
1208 |
<span class="setting link-rel"> |
|
1209 |
<label for="image-details-link-rel" class="name"><?php _e( 'Link Rel' ); ?></label> |
|
1210 |
<input type="text" id="image-details-link-rel" data-setting="linkRel" value="{{ data.model.linkRel }}" /> |
|
1211 |
</span> |
|
1212 |
<span class="setting link-class-name"> |
|
1213 |
<label for="image-details-link-css-class" class="name"><?php _e( 'Link CSS Class' ); ?></label> |
|
1214 |
<input type="text" id="image-details-link-css-class" data-setting="linkClassName" value="{{ data.model.linkClassName }}" /> |
|
1215 |
</span> |
|
5 | 1216 |
</div> |
1217 |
</div> |
|
1218 |
</div> |
|
1219 |
</div> |
|
16 | 1220 |
<div class="column-image"> |
1221 |
<div class="image"> |
|
1222 |
<img src="{{ data.model.url }}" draggable="false" alt="" /> |
|
1223 |
<# if ( data.attachment && window.imageEdit ) { #> |
|
1224 |
<div class="actions"> |
|
1225 |
<input type="button" class="edit-attachment button" value="<?php esc_attr_e( 'Edit Original' ); ?>" /> |
|
1226 |
<input type="button" class="replace-attachment button" value="<?php esc_attr_e( 'Replace' ); ?>" /> |
|
1227 |
</div> |
|
1228 |
<# } #> |
|
1229 |
</div> |
|
1230 |
</div> |
|
5 | 1231 |
</div> |
1232 |
</div> |
|
1233 |
</script> |
|
1234 |
||
16 | 1235 |
<?php // Template for the Image Editor layout. ?> |
5 | 1236 |
<script type="text/html" id="tmpl-image-editor"> |
1237 |
<div id="media-head-{{ data.id }}"></div> |
|
1238 |
<div id="image-editor-{{ data.id }}"></div> |
|
1239 |
</script> |
|
1240 |
||
16 | 1241 |
<?php // Template for an embedded Audio details. ?> |
5 | 1242 |
<script type="text/html" id="tmpl-audio-details"> |
1243 |
<# var ext, html5types = { |
|
1244 |
mp3: wp.media.view.settings.embedMimes.mp3, |
|
1245 |
ogg: wp.media.view.settings.embedMimes.ogg |
|
1246 |
}; #> |
|
1247 |
||
1248 |
<?php $audio_types = wp_get_audio_extensions(); ?> |
|
1249 |
<div class="media-embed media-embed-details"> |
|
1250 |
<div class="embed-media-settings embed-audio-settings"> |
|
9 | 1251 |
<?php wp_underscore_audio_template(); ?> |
5 | 1252 |
|
1253 |
<# if ( ! _.isEmpty( data.model.src ) ) { |
|
1254 |
ext = data.model.src.split('.').pop(); |
|
1255 |
if ( html5types[ ext ] ) { |
|
1256 |
delete html5types[ ext ]; |
|
1257 |
} |
|
1258 |
#> |
|
16 | 1259 |
<span class="setting"> |
1260 |
<label for="audio-details-source" class="name"><?php _e( 'URL' ); ?></label> |
|
1261 |
<input type="text" id="audio-details-source" readonly data-setting="src" value="{{ data.model.src }}" /> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1262 |
<button type="button" class="button-link remove-setting"><?php _e( 'Remove audio source' ); ?></button> |
16 | 1263 |
</span> |
5 | 1264 |
<# } #> |
1265 |
<?php |
|
0 | 1266 |
|
9 | 1267 |
foreach ( $audio_types as $type ) : |
1268 |
?> |
|
1269 |
<# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) { |
|
1270 |
if ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) { |
|
1271 |
delete html5types.<?php echo $type; ?>; |
|
5 | 1272 |
} |
1273 |
#> |
|
16 | 1274 |
<span class="setting"> |
1275 |
<label for="audio-details-<?php echo $type . '-source'; ?>" class="name"><?php echo strtoupper( $type ); ?></label> |
|
1276 |
<input type="text" id="audio-details-<?php echo $type . '-source'; ?>" readonly data-setting="<?php echo $type; ?>" value="{{ data.model.<?php echo $type; ?> }}" /> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1277 |
<button type="button" class="button-link remove-setting"><?php _e( 'Remove audio source' ); ?></button> |
16 | 1278 |
</span> |
5 | 1279 |
<# } #> |
1280 |
<?php endforeach ?> |
|
1281 |
||
1282 |
<# if ( ! _.isEmpty( html5types ) ) { #> |
|
16 | 1283 |
<fieldset class="setting-group"> |
1284 |
<legend class="name"><?php _e( 'Add alternate sources for maximum HTML5 playback' ); ?></legend> |
|
1285 |
<span class="setting"> |
|
1286 |
<span class="button-large"> |
|
1287 |
<# _.each( html5types, function (mime, type) { #> |
|
1288 |
<button class="button add-media-source" data-mime="{{ mime }}">{{ type }}</button> |
|
1289 |
<# } ) #> |
|
1290 |
</span> |
|
1291 |
</span> |
|
1292 |
</fieldset> |
|
5 | 1293 |
<# } #> |
1294 |
||
16 | 1295 |
<fieldset class="setting-group"> |
1296 |
<legend class="name"><?php _e( 'Preload' ); ?></legend> |
|
1297 |
<span class="setting preload"> |
|
1298 |
<span class="button-group button-large" data-setting="preload"> |
|
1299 |
<button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button> |
|
1300 |
<button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button> |
|
1301 |
<button class="button active" value="none"><?php _e( 'None' ); ?></button> |
|
1302 |
</span> |
|
1303 |
</span> |
|
1304 |
</fieldset> |
|
5 | 1305 |
|
16 | 1306 |
<span class="setting-group"> |
1307 |
<span class="setting checkbox-setting autoplay"> |
|
1308 |
<input type="checkbox" id="audio-details-autoplay" data-setting="autoplay" /> |
|
1309 |
<label for="audio-details-autoplay" class="checkbox-label"><?php _e( 'Autoplay' ); ?></label> |
|
1310 |
</span> |
|
5 | 1311 |
|
16 | 1312 |
<span class="setting checkbox-setting"> |
1313 |
<input type="checkbox" id="audio-details-loop" data-setting="loop" /> |
|
1314 |
<label for="audio-details-loop" class="checkbox-label"><?php _e( 'Loop' ); ?></label> |
|
1315 |
</span> |
|
1316 |
</span> |
|
5 | 1317 |
</div> |
1318 |
</div> |
|
1319 |
</script> |
|
1320 |
||
16 | 1321 |
<?php // Template for an embedded Video details. ?> |
5 | 1322 |
<script type="text/html" id="tmpl-video-details"> |
1323 |
<# var ext, html5types = { |
|
1324 |
mp4: wp.media.view.settings.embedMimes.mp4, |
|
1325 |
ogv: wp.media.view.settings.embedMimes.ogv, |
|
1326 |
webm: wp.media.view.settings.embedMimes.webm |
|
1327 |
}; #> |
|
1328 |
||
1329 |
<?php $video_types = wp_get_video_extensions(); ?> |
|
1330 |
<div class="media-embed media-embed-details"> |
|
1331 |
<div class="embed-media-settings embed-video-settings"> |
|
1332 |
<div class="wp-video-holder"> |
|
1333 |
<# |
|
1334 |
var w = ! data.model.width || data.model.width > 640 ? 640 : data.model.width, |
|
1335 |
h = ! data.model.height ? 360 : data.model.height; |
|
1336 |
||
1337 |
if ( data.model.width && w !== data.model.width ) { |
|
1338 |
h = Math.ceil( ( h * w ) / data.model.width ); |
|
1339 |
} |
|
1340 |
#> |
|
1341 |
||
9 | 1342 |
<?php wp_underscore_video_template(); ?> |
0 | 1343 |
|
5 | 1344 |
<# if ( ! _.isEmpty( data.model.src ) ) { |
1345 |
ext = data.model.src.split('.').pop(); |
|
1346 |
if ( html5types[ ext ] ) { |
|
1347 |
delete html5types[ ext ]; |
|
1348 |
} |
|
1349 |
#> |
|
16 | 1350 |
<span class="setting"> |
1351 |
<label for="video-details-source" class="name"><?php _e( 'URL' ); ?></label> |
|
1352 |
<input type="text" id="video-details-source" readonly data-setting="src" value="{{ data.model.src }}" /> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1353 |
<button type="button" class="button-link remove-setting"><?php _e( 'Remove video source' ); ?></button> |
16 | 1354 |
</span> |
5 | 1355 |
<# } #> |
9 | 1356 |
<?php |
1357 |
foreach ( $video_types as $type ) : |
|
1358 |
?> |
|
1359 |
<# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) { |
|
1360 |
if ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) { |
|
1361 |
delete html5types.<?php echo $type; ?>; |
|
5 | 1362 |
} |
1363 |
#> |
|
16 | 1364 |
<span class="setting"> |
1365 |
<label for="video-details-<?php echo $type . '-source'; ?>" class="name"><?php echo strtoupper( $type ); ?></label> |
|
1366 |
<input type="text" id="video-details-<?php echo $type . '-source'; ?>" readonly data-setting="<?php echo $type; ?>" value="{{ data.model.<?php echo $type; ?> }}" /> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1367 |
<button type="button" class="button-link remove-setting"><?php _e( 'Remove video source' ); ?></button> |
16 | 1368 |
</span> |
5 | 1369 |
<# } #> |
1370 |
<?php endforeach ?> |
|
1371 |
</div> |
|
1372 |
||
1373 |
<# if ( ! _.isEmpty( html5types ) ) { #> |
|
16 | 1374 |
<fieldset class="setting-group"> |
1375 |
<legend class="name"><?php _e( 'Add alternate sources for maximum HTML5 playback' ); ?></legend> |
|
1376 |
<span class="setting"> |
|
1377 |
<span class="button-large"> |
|
1378 |
<# _.each( html5types, function (mime, type) { #> |
|
1379 |
<button class="button add-media-source" data-mime="{{ mime }}">{{ type }}</button> |
|
1380 |
<# } ) #> |
|
1381 |
</span> |
|
1382 |
</span> |
|
1383 |
</fieldset> |
|
5 | 1384 |
<# } #> |
1385 |
||
1386 |
<# if ( ! _.isEmpty( data.model.poster ) ) { #> |
|
16 | 1387 |
<span class="setting"> |
1388 |
<label for="video-details-poster-image" class="name"><?php _e( 'Poster Image' ); ?></label> |
|
1389 |
<input type="text" id="video-details-poster-image" readonly data-setting="poster" value="{{ data.model.poster }}" /> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1390 |
<button type="button" class="button-link remove-setting"><?php _e( 'Remove poster image' ); ?></button> |
16 | 1391 |
</span> |
5 | 1392 |
<# } #> |
16 | 1393 |
|
1394 |
<fieldset class="setting-group"> |
|
1395 |
<legend class="name"><?php _e( 'Preload' ); ?></legend> |
|
1396 |
<span class="setting preload"> |
|
1397 |
<span class="button-group button-large" data-setting="preload"> |
|
1398 |
<button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button> |
|
1399 |
<button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button> |
|
1400 |
<button class="button active" value="none"><?php _e( 'None' ); ?></button> |
|
1401 |
</span> |
|
1402 |
</span> |
|
1403 |
</fieldset> |
|
5 | 1404 |
|
16 | 1405 |
<span class="setting-group"> |
1406 |
<span class="setting checkbox-setting autoplay"> |
|
1407 |
<input type="checkbox" id="video-details-autoplay" data-setting="autoplay" /> |
|
1408 |
<label for="video-details-autoplay" class="checkbox-label"><?php _e( 'Autoplay' ); ?></label> |
|
1409 |
</span> |
|
0 | 1410 |
|
16 | 1411 |
<span class="setting checkbox-setting"> |
1412 |
<input type="checkbox" id="video-details-loop" data-setting="loop" /> |
|
1413 |
<label for="video-details-loop" class="checkbox-label"><?php _e( 'Loop' ); ?></label> |
|
1414 |
</span> |
|
1415 |
</span> |
|
5 | 1416 |
|
16 | 1417 |
<span class="setting" data-setting="content"> |
5 | 1418 |
<# |
1419 |
var content = ''; |
|
1420 |
if ( ! _.isEmpty( data.model.content ) ) { |
|
1421 |
var tracks = jQuery( data.model.content ).filter( 'track' ); |
|
16 | 1422 |
_.each( tracks.toArray(), function( track, index ) { |
5 | 1423 |
content += track.outerHTML; #> |
16 | 1424 |
<label for="video-details-track-{{ index }}" class="name"><?php _e( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ); ?></label> |
1425 |
<input class="content-track" type="text" id="video-details-track-{{ index }}" aria-describedby="video-details-track-desc-{{ index }}" value="{{ track.outerHTML }}" /> |
|
1426 |
<span class="description" id="video-details-track-desc-{{ index }}"> |
|
1427 |
<?php |
|
1428 |
printf( |
|
1429 |
/* translators: 1: "srclang" HTML attribute, 2: "label" HTML attribute, 3: "kind" HTML attribute. */ |
|
1430 |
__( 'The %1$s, %2$s, and %3$s values can be edited to set the video track language and kind.' ), |
|
1431 |
'srclang', |
|
1432 |
'label', |
|
1433 |
'kind' |
|
1434 |
); |
|
1435 |
?> |
|
1436 |
</span> |
|
1437 |
<button type="button" class="button-link remove-setting remove-track"><?php _ex( 'Remove video track', 'media' ); ?></button><br/> |
|
5 | 1438 |
<# } ); #> |
1439 |
<# } else { #> |
|
16 | 1440 |
<span class="name"><?php _e( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ); ?></span><br /> |
5 | 1441 |
<em><?php _e( 'There are no associated subtitles.' ); ?></em> |
1442 |
<# } #> |
|
1443 |
<textarea class="hidden content-setting">{{ content }}</textarea> |
|
16 | 1444 |
</span> |
5 | 1445 |
</div> |
1446 |
</div> |
|
0 | 1447 |
</script> |
5 | 1448 |
|
16 | 1449 |
<?php // Template for a Gallery within the editor. ?> |
5 | 1450 |
<script type="text/html" id="tmpl-editor-gallery"> |
1451 |
<# if ( data.attachments.length ) { #> |
|
1452 |
<div class="gallery gallery-columns-{{ data.columns }}"> |
|
1453 |
<# _.each( data.attachments, function( attachment, index ) { #> |
|
1454 |
<dl class="gallery-item"> |
|
1455 |
<dt class="gallery-icon"> |
|
1456 |
<# if ( attachment.thumbnail ) { #> |
|
9 | 1457 |
<img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="{{ attachment.alt }}" /> |
5 | 1458 |
<# } else { #> |
9 | 1459 |
<img src="{{ attachment.url }}" alt="{{ attachment.alt }}" /> |
5 | 1460 |
<# } #> |
1461 |
</dt> |
|
1462 |
<# if ( attachment.caption ) { #> |
|
1463 |
<dd class="wp-caption-text gallery-caption"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1464 |
{{{ data.verifyHTML( attachment.caption ) }}} |
5 | 1465 |
</dd> |
1466 |
<# } #> |
|
1467 |
</dl> |
|
1468 |
<# if ( index % data.columns === data.columns - 1 ) { #> |
|
1469 |
<br style="clear: both;"> |
|
1470 |
<# } #> |
|
1471 |
<# } ); #> |
|
1472 |
</div> |
|
1473 |
<# } else { #> |
|
1474 |
<div class="wpview-error"> |
|
1475 |
<div class="dashicons dashicons-format-gallery"></div><p><?php _e( 'No items found.' ); ?></p> |
|
1476 |
</div> |
|
1477 |
<# } #> |
|
1478 |
</script> |
|
1479 |
||
16 | 1480 |
<?php // Template for the Crop area layout, used for example in the Customizer. ?> |
5 | 1481 |
<script type="text/html" id="tmpl-crop-content"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1482 |
<img class="crop-image" src="{{ data.url }}" alt="<?php esc_attr_e( 'Image crop area preview. Requires mouse interaction.' ); ?>"> |
5 | 1483 |
<div class="upload-errors"></div> |
1484 |
</script> |
|
1485 |
||
16 | 1486 |
<?php // Template for the Site Icon preview, used for example in the Customizer. ?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1487 |
<script type="text/html" id="tmpl-site-icon-preview"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1488 |
<h2><?php _e( 'Preview' ); ?></h2> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1489 |
<strong aria-hidden="true"><?php _e( 'As a browser icon' ); ?></strong> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1490 |
<div class="favicon-preview"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1491 |
<img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" height="" alt="" /> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1492 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1493 |
<div class="favicon"> |
18 | 1494 |
<img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>" /> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1495 |
</div> |
16 | 1496 |
<span class="browser-title" aria-hidden="true"><# print( '<?php bloginfo( 'name' ); ?>' ) #></span> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1497 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1498 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1499 |
<strong aria-hidden="true"><?php _e( 'As an app icon' ); ?></strong> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1500 |
<div class="app-icon-preview"> |
18 | 1501 |
<img id="preview-app-icon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>" /> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1502 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1503 |
</script> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1504 |
|
0 | 1505 |
<?php |
1506 |
||
5 | 1507 |
/** |
1508 |
* Fires when the custom Backbone media templates are printed. |
|
1509 |
* |
|
1510 |
* @since 3.5.0 |
|
1511 |
*/ |
|
0 | 1512 |
do_action( 'print_media_templates' ); |
1513 |
} |