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


git-svn-id: https://develop.svn.wordpress.org/trunk@41160 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2017-07-26 23:27:47 +00:00
parent c6c413403d
commit 609aaef919
2 changed files with 5 additions and 26 deletions
@@ -556,7 +556,6 @@ class WP_Plugins_List_Table extends WP_List_Table {
'deactivate' => '',
'activate' => '',
'details' => '',
'edit' => '',
'delete' => '',
);
@@ -637,10 +636,6 @@ class WP_Plugins_List_Table extends WP_List_Table {
} // end if $screen->in_admin( 'network' )
if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can( 'edit_plugins' ) && is_writable( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {
/* translators: %s: plugin name */
$actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Edit %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Edit' ) . '</a>';
}
} // end if $context
$actions = array_filter( $actions );
@@ -651,7 +646,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
* Filters the action links displayed for each plugin in the Network Admin Plugins list table.
*
* The default action links for the Network plugins list table include
* 'Network Activate', 'Network Deactivate', 'Edit', and 'Delete'.
* 'Network Activate', 'Network Deactivate', and 'Delete'.
*
* @since 3.1.0
*
@@ -687,8 +682,8 @@ class WP_Plugins_List_Table extends WP_List_Table {
* Filters the action links displayed for each plugin in the Plugins list table.
*
* The default action links for the site plugins list table include
* 'Activate', 'Deactivate', and 'Edit', for a network site, and
* 'Activate', 'Deactivate', 'Edit', and 'Delete' for a single site.
* 'Activate', and 'Deactivate', for a network site, and
* 'Activate', 'Deactivate', and 'Delete' for a single site.
*
* @since 2.5.0
* @since 2.6.0 The `$context` parameter was added.