Ticket #32254: 32254.2.patch
File 32254.2.patch, 14.3 KB (added by , 9 years ago) |
---|
-
src/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, … … 522 523 } 523 524 524 525 .widefat.media .check-column { 525 padding-top: 8px;526 padding-top: 10px; 526 527 } 527 528 528 529 .widefat thead th.check-column, … … 1719 1720 margin: 2px 0 0.8em; 1720 1721 } 1721 1722 1723 .widefat.media td .filename { 1724 margin: 0; /* reset unnecessary margin before row-actions */ 1725 } 1726 1722 1727 .widefat p, 1723 1728 .widefat ol, 1724 1729 .widefat ul { … … 2030 2035 2031 2036 /* - Only used once or twice in all of WP - deprecate for global style 2032 2037 ------------------------------------------------------------------------------*/ 2033 td.media-icon { 2038 .media-icon { 2039 width: 62px; /* icon + border */ 2034 2040 text-align: center; 2035 width: 80px;2036 padding-top: 8px;2037 padding-bottom: 8px;2038 2041 } 2039 2042 2040 td.media-icon a {2041 display: inline-block;2042 }2043 2043 2044 td.media-icon img { 2045 display: block; 2046 max-width: 80px; 2047 max-height: 60px; 2048 width: auto; 2049 height: auto; 2044 .media-icon img { 2050 2045 border: 1px solid #e7e7e7; 2051 2046 border: 1px solid rgba(0, 0, 0, 0.07); 2052 2047 } -
src/wp-admin/css/list-tables.css
297 297 } 298 298 299 299 /* Media file column */ 300 table.media .column-title {301 position: relative;302 }303 304 300 table.media .column-title .media-icon { 305 position: absolute;306 top: 8px; /* match cell padding */307 left: 10px; /* match cell padding */301 float: left; 302 min-height: 60px; 303 margin: 0 11px 0 0; 308 304 } 309 305 310 306 table.media .column-title .media-icon img { 311 307 max-width: 60px; 312 308 height: auto; 309 vertical-align: top; /* remove descender white-space */ 313 310 } 314 311 315 table.media .column-title .media-info,316 table.media .column-title .row-actions {317 margin-left: 70px; /* 60px image + margin */318 }319 320 312 /* @todo: pick a consistent list table selector */ 321 313 .wp-list-table a { 322 314 -webkit-transition: none; -
src/wp-admin/includes/class-wp-links-list-table.php
266 266 $edit_link = get_edit_bookmark_link( $link ); 267 267 268 268 $actions = array(); 269 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';270 269 $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>"; 271 270 return $this->row_actions($actions); 272 271 } -
src/wp-admin/includes/class-wp-media-list-table.php
363 363 case 'title': 364 364 list( $mime ) = explode( '/', $post->post_mime_type ); 365 365 366 echo "<div class='media-icon {$mime}-icon'>"; 366 if ( $thumb = wp_get_attachment_image( $post->ID, array( 60, 60 ), true, array( 'alt' => '' ) ) ) { 367 if ( $this->is_trash || ! $user_can_edit ) { 368 $link_start = $link_end = ''; 369 } else { 370 $link_start = '<a href="' . get_edit_post_link( $post->ID ) . '">'; 371 $link_end = '</a>'; 372 } 373 echo "<strong>$link_start<span class='media-icon {$mime}-icon'>$thumb</span>"; 374 echo '<span aria-hidden="true">' . $att_title . '</span>'; 375 echo '<span class="screen-reader-text">' . sprintf( __( 'Edit “%s”' ), $att_title ) . '</span>' . $link_end; 376 _media_states( $post ); 377 echo '</strong><p class="filename"><span class="screen-reader-text">' . __( 'File name:' ) . ' </span>' . wp_basename( $post->guid ) . '</p>'; 378 } 367 379 368 if ( $thumb = wp_get_attachment_image( $post->ID, array( 60, 60 ), true ) ) {369 if ( $this->is_trash || ! $user_can_edit ) {370 echo $thumb;371 } else { ?>372 <a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ); ?>">373 <?php echo $thumb; ?>374 </a><?php375 }376 }377 378 echo '</div><div class="media-info">';379 ?>380 <strong>381 <?php if ( $this->is_trash || ! $user_can_edit ) {382 echo $att_title;383 } else { ?>384 <a href="<?php echo get_edit_post_link( $post->ID ); ?>"385 title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ); ?>">386 <?php echo $att_title; ?></a>387 <?php }388 _media_states( $post ); ?></strong>389 <p class="filename"><?php echo wp_basename( $post->guid ); ?></p>390 </div>391 <?php392 380 break; 393 381 394 382 case 'author': … … 551 539 $actions = array(); 552 540 553 541 if ( $this->detached ) { 554 if ( current_user_can( 'edit_post', $post->ID ) )555 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '">' . __( 'Edit' ) . '</a>';556 542 if ( current_user_can( 'delete_post', $post->ID ) ) 557 543 if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { 558 544 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID ) . "'>" . __( 'Trash' ) . "</a>"; … … 565 551 $actions['attach'] = '<a href="#the-list" onclick="findPosts.open( \'media[]\',\''.$post->ID.'\' );return false;" class="hide-if-no-js">'.__( 'Attach' ).'</a>'; 566 552 } 567 553 else { 568 if ( current_user_can( 'edit_post', $post->ID ) && !$this->is_trash )569 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '">' . __( 'Edit' ) . '</a>';570 554 if ( current_user_can( 'delete_post', $post->ID ) ) { 571 555 if ( $this->is_trash ) 572 556 $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>"; … … 589 573 * @since 2.8.0 590 574 * 591 575 * @param array $actions An array of action links for each attachment. 592 * Default ' Edit', 'Delete Permanently', 'View'.576 * Default 'Delete Permanently', 'View'. 593 577 * @param WP_Post $post WP_Post object for the current attachment. 594 578 * @param bool $detached Whether the list table contains media not attached 595 579 * to any posts. Default true. -
src/wp-admin/includes/class-wp-ms-sites-list-table.php
409 409 410 410 // Preordered. 411 411 $actions = array( 412 ' edit' => '', 'backend' => '',412 'backend' => '', 413 413 'activate' => '', 'deactivate' => '', 414 414 'archive' => '', 'unarchive' => '', 415 415 'spam' => '', 'unspam' => '', … … 417 417 'visit' => '', 418 418 ); 419 419 420 $actions['edit'] = '<span class="edit"><a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ) . '">' . __( 'Edit' ) . '</a></span>';421 420 $actions['backend'] = "<span class='backend'><a href='" . esc_url( get_admin_url( $blog['blog_id'] ) ) . "' class='edit'>" . __( 'Dashboard' ) . '</a></span>'; 422 421 if ( get_current_site()->blog_id != $blog['blog_id'] ) { 423 422 if ( $blog['deleted'] == '1' ) { … … 448 447 /** 449 448 * Filter the action links displayed for each site in the Sites list table. 450 449 * 451 * The ' Edit', 'Dashboard', 'Delete', and 'Visit' links are displayed by450 * The 'Dashboard', 'Delete', and 'Visit' links are displayed by 452 451 * default for each site. The site's status determines whether to show the 453 452 * 'Activate' or 'Deactivate' link, 'Unarchive' or 'Archive' links, and 454 453 * 'Not Spam' or 'Spam' link for each site. -
src/wp-admin/includes/class-wp-ms-users-list-table.php
266 266 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>'; 267 267 echo ' <small class="row-actions">'; 268 268 $actions = array(); 269 $actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';270 269 271 270 $class = ''; 272 271 if ( $val->spam == 1 ) { … … 291 290 * @since 3.1.0 292 291 * 293 292 * @param array $actions An array of action links to be displayed. 294 * Default ' Edit', 'View'.293 * Default 'View'. 295 294 * @param int $userblog_id The site ID. 296 295 */ 297 296 $actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id ); … … 353 352 354 353 if ( $primary === $column_name ) { 355 354 $actions = array(); 356 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';357 355 358 356 if ( current_user_can( 'delete_user', $user->ID ) && ! in_array( $user->user_login, $super_admins ) ) { 359 357 $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>'; … … 365 363 * @since 3.2.0 366 364 * 367 365 * @param array $actions An array of action links to be displayed. 368 * Default ' Edit', 'Delete'.366 * Default 'Delete'. 369 367 * @param WP_User $user WP_User object. 370 368 */ 371 369 $actions = apply_filters( 'ms_user_row_actions', $actions, $user ); -
src/wp-admin/includes/class-wp-posts-list-table.php
1015 1015 $actions = array(); 1016 1016 1017 1017 if ( $can_edit_post && 'trash' != $post->post_status ) { 1018 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '" title="' . esc_attr__( 'Edit this item' ) . '">' . __( 'Edit' ) . '</a>';1019 1018 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr__( 'Edit this item inline' ) . '">' . __( 'Quick Edit' ) . '</a>'; 1020 1019 } 1021 1020 … … 1051 1050 * @since 2.8.0 1052 1051 * 1053 1052 * @param array $actions An array of row action links. Defaults are 1054 * ' Edit', 'Quick Edit', 'Restore, 'Trash',1053 * 'Quick Edit', 'Restore, 'Trash', 1055 1054 * 'Delete Permanently', 'Preview', and 'View'. 1056 1055 * @param WP_Post $post The post object. 1057 1056 */ … … 1066 1065 * @since 2.8.0 1067 1066 * 1068 1067 * @param array $actions An array of row action links. Defaults are 1069 * ' Edit', 'Quick Edit', 'Restore, 'Trash',1068 * 'Quick Edit', 'Restore, 'Trash', 1070 1069 * 'Delete Permanently', 'Preview', and 'View'. 1071 1070 * @param WP_Post $post The post object. 1072 1071 */ -
src/wp-admin/includes/class-wp-terms-list-table.php
406 406 if ( $primary === $column_name ) { 407 407 $actions = array(); 408 408 if ( current_user_can( $tax->cap->edit_terms ) ) { 409 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';410 409 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __( 'Quick Edit' ) . '</a>'; 411 410 } 412 411 if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term ) … … 421 420 * @deprecated 3.0.0 Use {$taxonomy}_row_actions instead. 422 421 * 423 422 * @param array $actions An array of action links to be displayed. Default 424 * ' Edit', 'Quick Edit', 'Delete', and 'View'.423 * 'Quick Edit', 'Delete', and 'View'. 425 424 * @param object $tag Term object. 426 425 */ 427 426 $actions = apply_filters( 'tag_row_actions', $actions, $tag ); … … 434 433 * @since 3.0.0 435 434 * 436 435 * @param array $actions An array of action links to be displayed. Default 437 * ' Edit', 'Quick Edit', 'Delete', and 'View'.436 * 'Quick Edit', 'Delete', and 'View'. 438 437 * @param object $tag Term object. 439 438 */ 440 439 $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag ); -
src/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 );