Ticket #46866: 46866.3.patch
File 46866.3.patch, 6.5 KB (added by , 5 years ago) |
---|
-
src/wp-admin/css/edit.css
diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index a4b585f350..1e18065cd0 100644
a b form#tags-filter { 459 459 #post-body .misc-pub-post-status:before, 460 460 #post-body #visibility:before, 461 461 .curtime #timestamp:before, 462 #post-body .misc-pub-uploadedby:before, 463 #post-body .misc-pub-uploadedto:before, 462 464 #post-body .misc-pub-revisions:before, 463 465 #post-body .misc-pub-response-to:before, 464 466 #post-body .misc-pub-comment-status:before { … … form#tags-filter { 468 470 #post-body .misc-pub-post-status:before, 469 471 #post-body #visibility:before, 470 472 .curtime #timestamp:before, 473 #post-body .misc-pub-uploadedby:before, 474 #post-body .misc-pub-uploadedto:before, 471 475 #post-body .misc-pub-revisions:before, 472 476 #post-body .misc-pub-response-to:before, 473 477 #post-body .misc-pub-comment-status:before { … … form#tags-filter { 496 500 top: -1px; 497 501 } 498 502 503 #post-body .misc-pub-uploadedby:before { 504 content: "\f110"; 505 position: relative; 506 top: -1px; 507 } 508 509 #post-body .misc-pub-uploadedto:before { 510 content: "\f317"; 511 position: relative; 512 top: -1px; 513 } 514 499 515 #post-body .misc-pub-revisions:before { 500 516 content: "\f321"; 501 517 } -
src/wp-admin/includes/media.php
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 94cc216df5..98c263d3a5 100644
a b function attachment_submitbox_metadata() { 3266 3266 3267 3267 $att_url = wp_get_attachment_url( $attachment_id ); 3268 3268 3269 ?> 3269 $author = get_userdata( $post->post_author ); 3270 3271 if ( $author && isset( $author->display_name ) ) : 3272 $uploaded_by_link = get_edit_user_link( $author->ID ); 3273 ?> 3274 <div class="misc-pub-section misc-pub-uploadedby"> 3275 <?php if ( ! empty( $uploaded_by_link ) ) : ?> 3276 <?php _e( 'Uploaded by:' ); ?> <a href="<?php echo $uploaded_by_link ?>"><strong><?php echo $author->display_name; ?></strong></a> 3277 <?php else: ?> 3278 <?php _e( 'Uploaded by:' ); ?> <strong><?php echo $author->display_name; ?></strong> 3279 <?php endif; ?> 3280 </div> 3281 <?php endif; 3282 3283 if ( $post->post_parent ) : 3284 3285 $post_parent = get_post( $post->post_parent ); 3286 $parent_type = get_post_type_object( $post_parent->post_type ); 3287 3288 if ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) : 3289 $uploaded_to_title = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); 3290 if ( $parent_type->show_ui ) { 3291 $uploaded_to_link = get_edit_post_link( $post->post_parent, 'raw' ); 3292 } ?> 3293 3294 <div class="misc-pub-section misc-pub-uploadedto"> 3295 <?php if ( isset( $uploaded_to_link ) && ! empty( $uploaded_to_link ) ) : ?> 3296 <?php _e( 'Uploaded to:' ); ?> <a href="<?php echo $uploaded_to_link ?>"><strong><?php echo $uploaded_to_title; ?></strong></a> 3297 <?php else: ?> 3298 <?php _e( 'Uploaded to:' ); ?> <strong><?php echo $uploaded_to_title; ?></strong> 3299 <?php endif; ?> 3300 </div> 3301 <?php endif; ?> 3302 3303 <?php endif; ?> 3304 3270 3305 <div class="misc-pub-section misc-pub-attachment"> 3271 3306 <label for="attachment_url"><?php _e( 'File URL:' ); ?></label> 3272 3307 <input type="text" class="widefat urlfield" readonly="readonly" name="attachment_url" id="attachment_url" value="<?php echo esc_attr( $att_url ); ?>" /> -
src/wp-includes/media-template.php
diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 47204f31b7..5b9eb9743f 100644
a b function wp_print_media_templates() { 405 405 </span> 406 406 <div class="details"> 407 407 <h2 class="screen-reader-text"><?php _e( 'Details' ); ?></h2> 408 <div class="filename"><strong><?php _e( 'File name:' ); ?></strong> {{ data.filename }}</div>409 <div class="filename"><strong><?php _e( 'File type:' ); ?></strong> {{ data.mime }}</div>410 408 <div class="uploaded"><strong><?php _e( 'Uploaded on:' ); ?></strong> {{ data.dateFormatted }}</div> 411 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 <# } #> 427 <div class="filename"><strong><?php _e( 'File name:' ); ?></strong> {{ data.filename }}</div> 428 <div class="file-type"><strong><?php _e( 'File type:' ); ?></strong> {{ data.mime }}</div> 412 429 <div class="file-size"><strong><?php _e( 'File size:' ); ?></strong> {{ data.filesizeHumanReadable }}</div> 413 430 <# if ( 'image' === data.type && ! data.uploading ) { #> 414 431 <# if ( data.width && data.height ) { #> … … function wp_print_media_templates() { 485 502 <label for="attachment-details-two-column-description" class="name"><?php _e( 'Description' ); ?></label> 486 503 <textarea id="attachment-details-two-column-description" {{ maybeReadOnly }}>{{ data.description }}</textarea> 487 504 </span> 488 <span class="setting">489 <span class="name"><?php _e( 'Uploaded By' ); ?></span>490 <span class="value">{{ data.authorName }}</span>491 </span>492 <# if ( data.uploadedToTitle ) { #>493 <span class="setting">494 <span class="name"><?php _e( 'Uploaded To' ); ?></span>495 <# if ( data.uploadedToLink ) { #>496 <span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span>497 <# } else { #>498 <span class="value">{{ data.uploadedToTitle }}</span>499 <# } #>500 </span>501 <# } #>502 505 <span class="setting" data-setting="url"> 503 506 <label for="attachment-details-two-column-copy-link" class="name"><?php _e( 'File URL:' ); ?></label> 504 507 <input type="text" class="attachment-details-copy-link" id="attachment-details-two-column-copy-link" value="{{ data.url }}" readonly /> -
src/wp-includes/media.php
diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index ece84326f7..c5252239a1 100644
a b function wp_prepare_attachment_for_js( $attachment ) { 3809 3809 $author = new WP_User( $attachment->post_author ); 3810 3810 if ( $author->exists() ) { 3811 3811 $response['authorName'] = html_entity_decode( $author->display_name, ENT_QUOTES, get_bloginfo( 'charset' ) ); 3812 $response['authorLink'] = get_edit_user_link( $author->ID ); 3812 3813 } else { 3813 3814 $response['authorName'] = __( '(no author)' ); 3814 3815 }