Ticket #26167: 26167.5.patch
| File 26167.5.patch, 10.1 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/css/list-tables.css
1069 1069 17.0 - Plugins 1070 1070 ------------------------------------------------------------------------------*/ 1071 1071 1072 .plugins tbody t h.check-column,1072 .plugins tbody td.check-column, 1073 1073 .plugins tbody { 1074 1074 padding: 8px 0 0 2px; 1075 1075 } 1076 1076 1077 .plugins tbody t h.check-column input[type=checkbox] {1077 .plugins tbody td.check-column input[type=checkbox] { 1078 1078 margin-top: 4px; 1079 margin-left: 8px; 1079 1080 } 1080 1081 1081 1082 #update-plugins-table tbody td p { … … 1088 1089 1089 1090 .plugins thead td.check-column, 1090 1091 .plugins tfoot td.check-column, 1091 .plugins .inactive t h.check-column {1092 .plugins .inactive td.check-column { 1092 1093 padding-left: 6px; 1093 1094 } 1094 1095 … … 1195 1196 background-color: #fef7f1; 1196 1197 } 1197 1198 1198 .plugins .active t h.check-column,1199 .plugins .active td.check-column, 1199 1200 .plugin-update-tr.active td { 1200 1201 border-left: 4px solid #00a0d2; 1201 1202 } 1202 1203 1203 .plugins .active.update t h.check-column,1204 .plugins .active.update td.check-column, 1204 1205 .plugins .active.update + .plugin-update-tr .plugin-update { 1205 1206 border-left: 4px solid #d54e21; 1206 1207 } … … 1208 1209 #wpbody-content .plugins .plugin-title, 1209 1210 #wpbody-content .plugins .theme-title { 1210 1211 padding-right: 12px; 1211 white-space:nowrap; 1212 white-space: nowrap; 1213 vertical-align: top; 1212 1214 } 1213 1215 1216 .plugins td.check-column input { 1217 vertical-align: text-top; 1218 } 1219 1220 .plugins td.plugin-title { 1221 font-size: 13px; 1222 line-height: 1.5em; 1223 } 1224 1214 1225 .plugins .inactive .plugin-title strong { 1215 1226 font-weight: 400; 1216 1227 } … … 1236 1247 .plugin-update-tr .update-message { 1237 1248 font-size: 13px; 1238 1249 font-weight: normal; 1239 margin: 0 10px 8px31px;1240 padding: 6px 12px 8px 40px;1250 margin: 0 10px 0 31px; 1251 padding: 6px 12px 16px 40px; 1241 1252 background-color: #f7f7f7; 1242 1253 background-color: rgba(0,0,0,0.03); 1243 1254 } … … 1865 1876 padding-bottom: 4px; 1866 1877 } 1867 1878 1868 .plugins tr.active + tr.inactive t h.check-column,1879 .plugins tr.active + tr.inactive td.check-column, 1869 1880 .plugins tr.active + tr.inactive td, 1870 1881 .wp-list-table.plugins .plugin-title, 1871 1882 .wp-list-table.plugins .theme-title, … … 1883 1894 box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1); 1884 1895 } 1885 1896 1886 .plugins tr.active + tr.inactive t h.check-column,1897 .plugins tr.active + tr.inactive td.check-column, 1887 1898 .plugins tr.active + tr.inactive td { 1888 1899 border-top: none; 1889 1900 } … … 1913 1924 position: relative; 1914 1925 } 1915 1926 1916 .wp-list-table.plugins th.check-column, 1917 .wp-list-table.plugins thead td.check-column, 1918 .wp-list-table.plugins tfoot td.check-column, 1919 .wp-list-table.plugins tr.update th.check-column { 1927 .wp-list-table.plugins td.check-column { 1920 1928 position: absolute; 1921 1929 height: auto; 1922 1930 top: 0; … … 1933 1941 background: none; 1934 1942 } 1935 1943 1936 .plugins tbody t h.check-column input[type="checkbox"] {1944 .plugins tbody td.check-column input[type="checkbox"] { 1937 1945 margin-top: -3px; 1938 1946 margin-left: 9px; 1939 1947 } 1940 1948 1941 .plugins tbody .active t h.check-column input[type="checkbox"],1942 .plugins tbody .active.update t h.check-column input[type="checkbox"] {1949 .plugins tbody .active td.check-column input[type="checkbox"], 1950 .plugins tbody .active.update td.check-column input[type="checkbox"] { 1943 1951 margin-left: 5px; 1944 1952 } 1945 1953 … … 1949 1957 margin-left: 8px; 1950 1958 } 1951 1959 1952 .wp-list-table.plugins .active t h.check-column {1960 .wp-list-table.plugins .active td.check-column { 1953 1961 background: none; 1954 1962 } 1955 1963 -
src/wp-admin/includes/class-wp-plugins-list-table.php
435 435 * @global int $page 436 436 * @global string $s 437 437 * @global array $totals 438 * 438 * 439 439 * @param array $item 440 440 */ 441 441 public function single_row( $item ) { … … 481 481 482 482 if ( $screen->in_admin( 'network' ) ) { 483 483 if ( $is_active ) { 484 if ( current_user_can( 'manage_network_plugins' ) ) 485 $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>'; 484 if ( current_user_can( 'manage_network_plugins' ) ) { 485 $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>'; 486 } 486 487 } else { 487 if ( current_user_can( 'manage_network_plugins' ) ) 488 $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>'; 489 if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) 490 $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>'; 488 if ( current_user_can( 'manage_network_plugins' ) ) { 489 $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>'; 490 } 491 if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) { 492 $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>'; 493 } 491 494 } 492 495 } else { 493 496 if ( $is_active ) { 494 $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>';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 ) . '" aria-label="' . esc_attr( sprintf( __( 'Deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>'; 495 498 } else { 496 $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>';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 ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Activate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>'; 497 500 498 if ( ! is_multisite() && current_user_can('delete_plugins') ) 499 $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>'; 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' ) . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>'; 503 } 500 504 } // end if $is_active 501 505 502 506 } // end if $screen->in_admin( 'network' ) 503 507 504 if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) 505 $actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . esc_attr__('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>'; 508 if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can( 'edit_plugins' ) && is_writable( WP_PLUGIN_DIR . '/' . $plugin_file ) ) { 509 $actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Edit %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Edit' ) . '</a>'; 510 } 506 511 } // end if $context 507 512 508 513 $prefix = $screen->in_admin( 'network' ) ? 'network_admin_' : ''; … … 589 594 590 595 switch ( $column_name ) { 591 596 case 'cb': 592 echo "<t h scope='row' class='check-column'>$checkbox</th>";597 echo "<td class='check-column'>$checkbox</td>"; 593 598 break; 594 599 case 'name': 595 600 echo "<td class='plugin-title column-primary'><strong>$plugin_name</strong>"; … … 600 605 $classes = 'column-description desc'; 601 606 602 607 echo "<td class='$classes{$extra_classes}'> 608 <div class='screen-reader-text'>$plugin_name</div> 603 609 <div class='plugin-description'>$description</div> 604 610 <div class='$class second plugin-version-author-uri'>"; 605 611