Make WordPress Core

Ticket #26167: 26167.6.patch

File 26167.6.patch, 9.9 KB (added by afercia, 10 years ago)
  • src/wp-admin/css/list-tables.css

     
    11231123  17.0 - Plugins
    11241124------------------------------------------------------------------------------*/
    11251125
    1126 .plugins tbody th.check-column,
     1126.plugins tbody td.check-column,
    11271127.plugins tbody {
    11281128        padding: 8px 0 0 2px;
    11291129}
    11301130
    1131 .plugins tbody th.check-column input[type=checkbox] {
     1131.plugins tbody td.check-column input[type=checkbox] {
    11321132        margin-top: 4px;
     1133        margin-left: 8px;
    11331134}
    11341135
    11351136#update-plugins-table tbody td p {
     
    11421143
    11431144.plugins thead td.check-column,
    11441145.plugins tfoot td.check-column,
    1145 .plugins .inactive th.check-column {
     1146.plugins .inactive td.check-column {
    11461147        padding-left: 6px;
    11471148}
    11481149
     
    12491250        background-color: #fef7f1;
    12501251}
    12511252
    1252 .plugins .active th.check-column,
     1253.plugins .active td.check-column,
    12531254.plugin-update-tr.active td {
    12541255        border-left: 4px solid #00a0d2;
    12551256}
    12561257
    1257 .plugins .active.update th.check-column,
     1258.plugins .active.update td.check-column,
    12581259.plugins .active.update + .plugin-update-tr .plugin-update {
    12591260        border-left: 4px solid #d54e21;
    12601261}
     
    12621263#wpbody-content .plugins .plugin-title,
    12631264#wpbody-content .plugins .theme-title {
    12641265        padding-right: 12px;
    1265         white-space:nowrap;
     1266        white-space: nowrap;
     1267        vertical-align: top;
    12661268}
    12671269
     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
    12681279.plugins .inactive .plugin-title strong {
    12691280        font-weight: 400;
    12701281}
     
    12901301.plugin-update-tr .update-message {
    12911302        font-size: 13px;
    12921303        font-weight: normal;
    1293         margin: 0 10px 8px 31px;
    1294         padding: 6px 12px 8px 40px;
     1304        margin: 0 10px 0 31px;
     1305        padding: 6px 12px 16px 40px;
    12951306        background-color: #f7f7f7;
    12961307        background-color: rgba(0,0,0,0.03);
    12971308}
     
    17381749        }
    17391750
    17401751        /* Checkboxes need to show */
     1752        .wp-list-table tr td.check-column,
    17411753        .wp-list-table tr th.check-column {
    17421754                display: table-cell;
    17431755                width: 35px;
     
    19101922                padding: 10px 9px; /* reset from other list tables that have a label at this width */
    19111923        }
    19121924
     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
    19131931        #wpbody-content .wp-list-table.plugins .column-description {
    19141932                padding-top: 2px;
    19151933        }
     
    19311949                padding: 1px 0 0;
    19321950        }
    19331951
    1934         .plugins tr.active + tr.inactive th.check-column,
     1952        .plugins tr.active + tr.inactive td.check-column,
    19351953        .plugins tr.active + tr.inactive td.column-description,
    19361954        .plugins .plugin-update-tr:before {
    19371955                -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
     
    19381956                box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    19391957        }
    19401958
    1941         .plugins tr.active + tr.inactive th.check-column,
     1959        .plugins tr.active + tr.inactive td.check-column,
    19421960        .plugins tr.active + tr.inactive td {
    19431961                border-top: none;
    19441962        }
  • src/wp-admin/includes/class-wp-plugins-list-table.php

     
    438438         * @global int $page
    439439         * @global string $s
    440440         * @global array $totals
    441          * 
     441         *
    442442         * @param array $item
    443443         */
    444444        public function single_row( $item ) {
     
    484484
    485485                        if ( $screen->in_admin( 'network' ) ) {
    486486                                if ( $is_active ) {
    487                                         if ( current_user_can( 'manage_network_plugins' ) )
    488                                                 $actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;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&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( __( 'Network deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>';
     490                                                }
    489491                                } else {
    490                                         if ( current_user_can( 'manage_network_plugins' ) )
    491                                                 $actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;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&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;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&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;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&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
     499                                        }
    494500                                }
    495501                        } else {
    496502                                if ( $is_active ) {
    497                                         $actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;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&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( __( 'Deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>';
    498505                                } else {
    499                                         $actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;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&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Activate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>';
    500508
    501                                         if ( ! is_multisite() && current_user_can('delete_plugins') )
    502                                                 $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;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&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
     512                                        }
    503513                                } // end if $is_active
    504514
    505515                         } // end if $screen->in_admin( 'network' )
    506516
    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                        }
    509521                } // end if $context
    510522
    511523                $prefix = $screen->in_admin( 'network' ) ? 'network_admin_' : '';
     
    592604
    593605                        switch ( $column_name ) {
    594606                                case 'cb':
    595                                         echo "<th scope='row' class='check-column'>$checkbox</th>";
     607                                        echo "<td class='check-column'>$checkbox</td>";
    596608                                        break;
    597609                                case 'name':
    598610                                        echo "<td class='plugin-title column-primary'><strong>$plugin_name</strong>";
     
    603615                                        $classes = 'column-description desc';
    604616
    605617                                        echo "<td class='$classes{$extra_classes}'>
     618                                                <div class='screen-reader-text'>$plugin_name</div>
    606619                                                <div class='plugin-description'>$description</div>
    607620                                                <div class='$class second plugin-version-author-uri'>";
    608621