Ticket #26167: 26167.6.patch
File 26167.6.patch, 9.9 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/list-tables.css
1123 1123 17.0 - Plugins 1124 1124 ------------------------------------------------------------------------------*/ 1125 1125 1126 .plugins tbody t h.check-column,1126 .plugins tbody td.check-column, 1127 1127 .plugins tbody { 1128 1128 padding: 8px 0 0 2px; 1129 1129 } 1130 1130 1131 .plugins tbody t h.check-column input[type=checkbox] {1131 .plugins tbody td.check-column input[type=checkbox] { 1132 1132 margin-top: 4px; 1133 margin-left: 8px; 1133 1134 } 1134 1135 1135 1136 #update-plugins-table tbody td p { … … 1142 1143 1143 1144 .plugins thead td.check-column, 1144 1145 .plugins tfoot td.check-column, 1145 .plugins .inactive t h.check-column {1146 .plugins .inactive td.check-column { 1146 1147 padding-left: 6px; 1147 1148 } 1148 1149 … … 1249 1250 background-color: #fef7f1; 1250 1251 } 1251 1252 1252 .plugins .active t h.check-column,1253 .plugins .active td.check-column, 1253 1254 .plugin-update-tr.active td { 1254 1255 border-left: 4px solid #00a0d2; 1255 1256 } 1256 1257 1257 .plugins .active.update t h.check-column,1258 .plugins .active.update td.check-column, 1258 1259 .plugins .active.update + .plugin-update-tr .plugin-update { 1259 1260 border-left: 4px solid #d54e21; 1260 1261 } … … 1262 1263 #wpbody-content .plugins .plugin-title, 1263 1264 #wpbody-content .plugins .theme-title { 1264 1265 padding-right: 12px; 1265 white-space:nowrap; 1266 white-space: nowrap; 1267 vertical-align: top; 1266 1268 } 1267 1269 1270 .plugins td.check-column input { 1271 vertical-align: text-top; 1272 } 1273 1274 .plugins td.plugin-title { 1275 font-size: 13px; 1276 line-height: 1.5em; 1277 } 1278 1268 1279 .plugins .inactive .plugin-title strong { 1269 1280 font-weight: 400; 1270 1281 } … … 1290 1301 .plugin-update-tr .update-message { 1291 1302 font-size: 13px; 1292 1303 font-weight: normal; 1293 margin: 0 10px 8px31px;1294 padding: 6px 12px 8px 40px;1304 margin: 0 10px 0 31px; 1305 padding: 6px 12px 16px 40px; 1295 1306 background-color: #f7f7f7; 1296 1307 background-color: rgba(0,0,0,0.03); 1297 1308 } … … 1738 1749 } 1739 1750 1740 1751 /* Checkboxes need to show */ 1752 .wp-list-table tr td.check-column, 1741 1753 .wp-list-table tr th.check-column { 1742 1754 display: table-cell; 1743 1755 width: 35px; … … 1910 1922 padding: 10px 9px; /* reset from other list tables that have a label at this width */ 1911 1923 } 1912 1924 1925 #wpbody-content .wp-list-table.plugins tbody td.check-column { 1926 display: table-cell; 1927 width: 35px; 1928 padding: 8px 0 8px 9px; 1929 } 1930 1913 1931 #wpbody-content .wp-list-table.plugins .column-description { 1914 1932 padding-top: 2px; 1915 1933 } … … 1931 1949 padding: 1px 0 0; 1932 1950 } 1933 1951 1934 .plugins tr.active + tr.inactive t h.check-column,1952 .plugins tr.active + tr.inactive td.check-column, 1935 1953 .plugins tr.active + tr.inactive td.column-description, 1936 1954 .plugins .plugin-update-tr:before { 1937 1955 -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); … … 1938 1956 box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); 1939 1957 } 1940 1958 1941 .plugins tr.active + tr.inactive t h.check-column,1959 .plugins tr.active + tr.inactive td.check-column, 1942 1960 .plugins tr.active + tr.inactive td { 1943 1961 border-top: none; 1944 1962 } -
src/wp-admin/includes/class-wp-plugins-list-table.php
438 438 * @global int $page 439 439 * @global string $s 440 440 * @global array $totals 441 * 441 * 442 442 * @param array $item 443 443 */ 444 444 public function single_row( $item ) { … … 484 484 485 485 if ( $screen->in_admin( 'network' ) ) { 486 486 if ( $is_active ) { 487 if ( current_user_can( 'manage_network_plugins' ) ) 488 $actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Deactivate this plugin') . '">' . __('Network Deactivate') . '</a>'; 487 if ( current_user_can( 'manage_network_plugins' ) ) { 488 /* translators: %s: plugin name */ 489 $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( __( 'Network deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>'; 490 } 489 491 } else { 490 if ( current_user_can( 'manage_network_plugins' ) ) 491 $actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin for all sites in this network') . '" class="edit">' . __('Network Activate') . '</a>'; 492 if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) 493 $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins') . '" title="' . esc_attr__('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>'; 492 if ( current_user_can( 'manage_network_plugins' ) ) { 493 /* translators: %s: plugin name */ 494 $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Network Activate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>'; 495 } 496 if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) { 497 /* translators: %s: plugin name */ 498 $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>'; 499 } 494 500 } 495 501 } else { 496 502 if ( $is_active ) { 497 $actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Deactivate this plugin') . '">' . __('Deactivate') . '</a>'; 503 /* translators: %s: plugin name */ 504 $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( __( 'Deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>'; 498 505 } else { 499 $actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>'; 506 /* translators: %s: plugin name */ 507 $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Activate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>'; 500 508 501 if ( ! is_multisite() && current_user_can('delete_plugins') ) 502 $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins') . '" title="' . esc_attr__('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>'; 509 if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) { 510 /* translators: %s: plugin name */ 511 $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>'; 512 } 503 513 } // end if $is_active 504 514 505 515 } // end if $screen->in_admin( 'network' ) 506 516 507 if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) 508 $actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . esc_attr__('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>'; 517 if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can( 'edit_plugins' ) && is_writable( WP_PLUGIN_DIR . '/' . $plugin_file ) ) { 518 /* translators: %s: plugin name */ 519 $actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Edit %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Edit' ) . '</a>'; 520 } 509 521 } // end if $context 510 522 511 523 $prefix = $screen->in_admin( 'network' ) ? 'network_admin_' : ''; … … 592 604 593 605 switch ( $column_name ) { 594 606 case 'cb': 595 echo "<t h scope='row' class='check-column'>$checkbox</th>";607 echo "<td class='check-column'>$checkbox</td>"; 596 608 break; 597 609 case 'name': 598 610 echo "<td class='plugin-title column-primary'><strong>$plugin_name</strong>"; … … 603 615 $classes = 'column-description desc'; 604 616 605 617 echo "<td class='$classes{$extra_classes}'> 618 <div class='screen-reader-text'>$plugin_name</div> 606 619 <div class='plugin-description'>$description</div> 607 620 <div class='$class second plugin-version-author-uri'>"; 608 621