Ticket #32254: 32254.4.patch
File 32254.4.patch, 14.1 KB (added by , 9 years ago) |
---|
-
wp-admin/css/common.css
264 264 color: #00a0d2; 265 265 } 266 266 267 a:focus { 267 a:focus, 268 a:focus .media-icon img { 268 269 color: #124964; 269 270 -webkit-box-shadow: 270 271 0 0 0 1px #5b9dd9, … … 531 532 } 532 533 533 534 .widefat.media .check-column { 534 padding-top: 8px;535 padding-top: 10px; 535 536 } 536 537 537 538 .widefat thead td.check-column, … … 2028 2029 2029 2030 /* - Only used once or twice in all of WP - deprecate for global style 2030 2031 ------------------------------------------------------------------------------*/ 2031 td.media-icon { 2032 .media-icon { 2033 width: 62px; /* icon + border */ 2032 2034 text-align: center; 2033 width: 80px;2034 padding-top: 8px;2035 padding-bottom: 8px;2036 2035 } 2037 2036 2038 td.media-icon a { 2039 display: inline-block; 2040 } 2041 2042 td.media-icon img { 2043 display: block; 2044 max-width: 80px; 2045 max-height: 60px; 2046 width: auto; 2047 height: auto; 2037 .media-icon img { 2048 2038 border: 1px solid #e7e7e7; 2049 2039 border: 1px solid rgba(0, 0, 0, 0.07); 2050 2040 } -
wp-admin/css/list-tables.css
296 296 float: left; 297 297 } 298 298 299 /* Media file column */300 table.media .column-title {301 position: relative;302 }303 299 300 304 301 table.media .column-title .media-icon { 305 position: absolute;306 top: 8px; /* match cell padding */307 left: 10px; /* match cell padding */ 302 float: left; 303 min-height: 60px; 304 margin: 0 11px 0 0; 308 305 } 309 306 310 307 table.media .column-title .media-icon img { 311 308 max-width: 60px; 312 309 height: auto; 310 vertical-align: top; /* remove descender white-space */ 313 311 } 314 312 313 table.media .column-title .filename { 314 margin-bottom: 0.2em; 315 } 316 315 317 table.media .column-title .media-info, 316 318 table.media .column-title .row-actions { 317 319 margin-left: 70px; /* 60px image + margin */ 318 320 } 319 321 320 table.media .column-title . media-info p {321 margin-bottom: 0.2em; 322 } 322 table.media .column-title .filename { 323 margin-bottom: 0.2em; 324 } 323 325 324 326 /* @todo: pick a consistent list table selector */ 325 327 .wp-list-table a { -
wp-admin/includes/class-wp-links-list-table.php
290 290 $edit_link = get_edit_bookmark_link( $link ); 291 291 292 292 $actions = array(); 293 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';294 293 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id) . "' onclick=\"if ( confirm( '" . esc_js(sprintf(__("You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete."), $link->link_name)) . "' ) ) { return true;}return false;\">" . __('Delete') . "</a>"; 295 294 return $this->row_actions($actions); 296 295 } -
wp-admin/includes/class-wp-media-list-table.php
334 334 335 335 $user_can_edit = current_user_can( 'edit_post', $post->ID ); 336 336 $att_title = _draft_or_post_title(); 337 ?>338 <div class="media-icon <?php echo $mime ?>-icon">339 <?php340 337 341 $thumb = wp_get_attachment_image( $post->ID, array( 60, 60 ), true );338 $thumb = wp_get_attachment_image( $post->ID, array( 60, 60 ), true, array( 'alt' => '' ) ); 342 339 if ( $thumb ) { 340 343 341 if ( $this->is_trash || ! $user_can_edit ) { 344 echo $thumb; 345 } else { ?> 346 <a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php 347 echo esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ); 348 ?>"><?php echo $thumb; ?></a><?php 342 $link_start = $link_end = ''; 343 } else { 344 $link_start = '<a href="' . get_edit_post_link( $post->ID ) . '">'; 345 $link_end = '</a>'; 349 346 } 350 }351 347 352 ?> 353 </div> 354 <div class="media-info"> 355 <strong> 356 <?php 357 if ( $this->is_trash || ! $user_can_edit ) { 358 echo $att_title; 359 } else { ?> 360 <a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php 361 echo esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ); 362 ?>"><?php echo $att_title; ?></a><?php 363 } 348 ?> 349 <strong><?php echo $link_start ?><span class='media-icon <?php echo sanitize_html_class( $mime . '-icon' ); ?>'><?php echo $thumb; ?></span> 350 <span aria-hidden="true"><?php echo $att_title ; ?></span> 351 <span class="screen-reader-text"><?php printf( __( 'Edit “%s”' ), $att_title ); ?></span> 352 <?php 353 echo $link_end; 364 354 _media_states( $post ); 365 355 ?> 366 </strong> 367 < p class="filename"><?php echo wp_basename( $post->guid ); ?></p>368 </div>369 <?php356 </strong><p class="filename"><span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span> 357 <?php echo wp_basename( $post->guid ); ?></p> 358 <?php 359 } 370 360 } 371 361 372 362 /** … … 575 565 $actions = array(); 576 566 577 567 if ( $this->detached ) { 578 if ( current_user_can( 'edit_post', $post->ID ) )579 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '">' . __( 'Edit' ) . '</a>';580 568 if ( current_user_can( 'delete_post', $post->ID ) ) 581 569 if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { 582 570 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID ) . "'>" . __( 'Trash' ) . "</a>"; … … 589 577 $actions['attach'] = '<a href="#the-list" onclick="findPosts.open( \'media[]\',\''.$post->ID.'\' );return false;" class="hide-if-no-js">'.__( 'Attach' ).'</a>'; 590 578 } 591 579 else { 592 if ( current_user_can( 'edit_post', $post->ID ) && !$this->is_trash )593 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '">' . __( 'Edit' ) . '</a>';594 580 if ( current_user_can( 'delete_post', $post->ID ) ) { 595 581 if ( $this->is_trash ) 596 582 $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>"; … … 613 599 * @since 2.8.0 614 600 * 615 601 * @param array $actions An array of action links for each attachment. 616 * Default ' Edit', 'Delete Permanently', 'View'.602 * Default 'Delete Permanently', 'View'. 617 603 * @param WP_Post $post WP_Post object for the current attachment. 618 604 * @param bool $detached Whether the list table contains media not attached 619 605 * to any posts. Default true. -
wp-admin/includes/class-wp-ms-sites-list-table.php
489 489 490 490 // Preordered. 491 491 $actions = array( 492 ' edit' => '', 'backend' => '',492 'backend' => '', 493 493 'activate' => '', 'deactivate' => '', 494 494 'archive' => '', 'unarchive' => '', 495 495 'spam' => '', 'unspam' => '', … … 497 497 'visit' => '', 498 498 ); 499 499 500 $actions['edit'] = '<span class="edit"><a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ) . '">' . __( 'Edit' ) . '</a></span>';501 500 $actions['backend'] = "<span class='backend'><a href='" . esc_url( get_admin_url( $blog['blog_id'] ) ) . "' class='edit'>" . __( 'Dashboard' ) . '</a></span>'; 502 501 if ( get_current_site()->blog_id != $blog['blog_id'] ) { 503 502 if ( $blog['deleted'] == '1' ) { … … 528 527 /** 529 528 * Filter the action links displayed for each site in the Sites list table. 530 529 * 531 * The ' Edit', 'Dashboard', 'Delete', and 'Visit' links are displayed by530 * The 'Dashboard', 'Delete', and 'Visit' links are displayed by 532 531 * default for each site. The site's status determines whether to show the 533 532 * 'Activate' or 'Deactivate' link, 'Unarchive' or 'Archive' links, and 534 533 * 'Not Spam' or 'Spam' link for each site. -
wp-admin/includes/class-wp-ms-users-list-table.php
262 262 echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . get_current_site()->domain, '', $val->domain . $path ) . '</a>'; 263 263 echo ' <small class="row-actions">'; 264 264 $actions = array(); 265 $actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';266 265 267 266 $class = ''; 268 267 if ( $val->spam == 1 ) { … … 287 286 * @since 3.1.0 288 287 * 289 288 * @param array $actions An array of action links to be displayed. 290 * Default ' Edit', 'View'.289 * Default 'View'. 291 290 * @param int $userblog_id The site ID. 292 291 */ 293 292 $actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id ); … … 411 410 412 411 if ( $primary === $column_name ) { 413 412 $actions = array(); 414 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';415 413 416 414 if ( current_user_can( 'delete_user', $user->ID ) && ! in_array( $user->user_login, $super_admins ) ) { 417 415 $actions['delete'] = '<a href="' . $delete = esc_url( network_admin_url( add_query_arg( '_wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'users.php', 'deleteuser' ) . '&action=deleteuser&id=' . $user->ID ) ) ) . '" class="delete">' . __( 'Delete' ) . '</a>'; … … 423 421 * @since 3.2.0 424 422 * 425 423 * @param array $actions An array of action links to be displayed. 426 * Default ' Edit', 'Delete'.424 * Default 'Delete'. 427 425 * @param WP_User $user WP_User object. 428 426 */ 429 427 $actions = apply_filters( 'ms_user_row_actions', $actions, $user ); -
wp-admin/includes/class-wp-posts-list-table.php
1064 1064 $actions = array(); 1065 1065 1066 1066 if ( $can_edit_post && 'trash' != $post->post_status ) { 1067 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '" title="' . esc_attr__( 'Edit this item' ) . '">' . __( 'Edit' ) . '</a>';1068 1067 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr__( 'Edit this item inline' ) . '">' . __( 'Quick Edit' ) . '</a>'; 1069 1068 } 1070 1069 … … 1100 1099 * @since 2.8.0 1101 1100 * 1102 1101 * @param array $actions An array of row action links. Defaults are 1103 * ' Edit', 'Quick Edit', 'Restore, 'Trash',1102 * 'Quick Edit', 'Restore, 'Trash', 1104 1103 * 'Delete Permanently', 'Preview', and 'View'. 1105 1104 * @param WP_Post $post The post object. 1106 1105 */ … … 1115 1114 * @since 2.8.0 1116 1115 * 1117 1116 * @param array $actions An array of row action links. Defaults are 1118 * ' Edit', 'Quick Edit', 'Restore, 'Trash',1117 * 'Quick Edit', 'Restore, 'Trash', 1119 1118 * 'Delete Permanently', 'Preview', and 'View'. 1120 1119 * @param WP_Post $post The post object. 1121 1120 */ -
wp-admin/includes/class-wp-terms-list-table.php
405 405 if ( $primary === $column_name ) { 406 406 $actions = array(); 407 407 if ( current_user_can( $tax->cap->edit_terms ) ) { 408 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';409 408 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __( 'Quick Edit' ) . '</a>'; 410 409 } 411 410 if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term ) … … 420 419 * @deprecated 3.0.0 Use {$taxonomy}_row_actions instead. 421 420 * 422 421 * @param array $actions An array of action links to be displayed. Default 423 * ' Edit', 'Quick Edit', 'Delete', and 'View'.422 * 'Quick Edit', 'Delete', and 'View'. 424 423 * @param object $tag Term object. 425 424 */ 426 425 $actions = apply_filters( 'tag_row_actions', $actions, $tag ); … … 433 432 * @since 3.0.0 434 433 * 435 434 * @param array $actions An array of action links to be displayed. Default 436 * ' Edit', 'Quick Edit', 'Delete', and 'View'.435 * 'Quick Edit', 'Delete', and 'View'. 437 436 * @param object $tag Term object. 438 437 */ 439 438 $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag ); -
wp-admin/includes/class-wp-users-list-table.php
370 370 371 371 if ( current_user_can( 'edit_user', $user_object->ID ) ) { 372 372 $edit = "<strong><a href=\"$edit_link\">$user_object->user_login</a></strong><br />"; 373 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';374 373 } else { 375 374 $edit = "<strong>$user_object->user_login</strong><br />"; 376 375 } … … 386 385 * @since 2.8.0 387 386 * 388 387 * @param array $actions An array of action links to be displayed. 389 * Default ' Edit', 'Delete' for single site, and390 * ' Edit', 'Remove' for Multisite.388 * Default 'Delete' for single site, and 389 * 'Remove' for Multisite. 391 390 * @param WP_User $user_object WP_User object for the currently-listed user. 392 391 */ 393 392 $actions = apply_filters( 'user_row_actions', $actions, $user_object );