WordPress.org

Make WordPress Core

Changeset 41160


Ignore:
Timestamp:
07/26/2017 11:27:47 PM (2 years ago)
Author:
johnbillion
Message:

Administration: Remove Edit links from all plugin listing screens and the remaining theme listing screens.

This simplifies these list tables, reducing user confusion, without removing functionality.

Fixes #38169

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r38827 r41160  
    396396            'enable' => '',
    397397            'disable' => '',
    398             'edit' => '',
    399398            'delete' => ''
    400399        );
     
    449448        }
    450449
    451         if ( current_user_can('edit_themes') ) {
    452             $url = add_query_arg( array(
    453                 'theme' => $theme_key,
    454             ), 'theme-editor.php' );
    455 
    456             /* translators: %s: theme name */
    457             $aria_label = sprintf( __( 'Open %s in the Theme Editor' ), $theme->display( 'Name' ) );
    458 
    459             $actions['edit'] = sprintf( '<a href="%s" class="edit" aria-label="%s">%s</a>',
    460                 esc_url( $url ),
    461                 esc_attr( $aria_label ),
    462                 __( 'Edit' )
    463             );
    464         }
    465 
    466450        if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) {
    467451            $url = add_query_arg( array(
     
    493477         *
    494478         * The default action links for the Network themes list table include
    495          * 'Network Enable', 'Network Disable', 'Edit', and 'Delete'.
     479         * 'Network Enable', 'Network Disable', and 'Delete'.
    496480         *
    497481         * The default action links for the Site themes list table include
    498          * 'Enable', 'Disable', and 'Edit'.
     482         * 'Enable', and 'Disable'.
    499483         *
    500484         * @since 2.8.0
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r39063 r41160  
    557557            'activate' => '',
    558558            'details' => '',
    559             'edit' => '',
    560559            'delete' => '',
    561560        );
     
    638637             } // end if $screen->in_admin( 'network' )
    639638
    640             if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can( 'edit_plugins' ) && is_writable( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {
    641                 /* translators: %s: plugin name */
    642                 $actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Edit %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Edit' ) . '</a>';
    643             }
    644639        } // end if $context
    645640
     
    652647             *
    653648             * The default action links for the Network plugins list table include
    654              * 'Network Activate', 'Network Deactivate', 'Edit', and 'Delete'.
     649             * 'Network Activate', 'Network Deactivate', and 'Delete'.
    655650             *
    656651             * @since 3.1.0
     
    688683             *
    689684             * The default action links for the site plugins list table include
    690              * 'Activate', 'Deactivate', and 'Edit', for a network site, and
    691              * 'Activate', 'Deactivate', 'Edit', and 'Delete' for a single site.
     685             * 'Activate', and 'Deactivate', for a network site, and
     686             * 'Activate', 'Deactivate', and 'Delete' for a single site.
    692687             *
    693688             * @since 2.5.0
Note: See TracChangeset for help on using the changeset viewer.