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

Built from https://develop.svn.wordpress.org/trunk@41160


git-svn-id: http://core.svn.wordpress.org/trunk@41000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2017-07-26 23:28:46 +00:00
parent be94fa5483
commit 32128ffd45
3 changed files with 6 additions and 27 deletions

View File

@ -395,7 +395,6 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
$actions = array(
'enable' => '',
'disable' => '',
'edit' => '',
'delete' => ''
);
@ -448,21 +447,6 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
);
}
if ( current_user_can('edit_themes') ) {
$url = add_query_arg( array(
'theme' => $theme_key,
), 'theme-editor.php' );
/* translators: %s: theme name */
$aria_label = sprintf( __( 'Open %s in the Theme Editor' ), $theme->display( 'Name' ) );
$actions['edit'] = sprintf( '<a href="%s" class="edit" aria-label="%s">%s</a>',
esc_url( $url ),
esc_attr( $aria_label ),
__( 'Edit' )
);
}
if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) {
$url = add_query_arg( array(
'action' => 'delete-selected',
@ -492,10 +476,10 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
* non-network enabled themes when editing a site in the Network admin.
*
* The default action links for the Network themes list table include
* 'Network Enable', 'Network Disable', 'Edit', and 'Delete'.
* 'Network Enable', 'Network Disable', and 'Delete'.
*
* The default action links for the Site themes list table include
* 'Enable', 'Disable', and 'Edit'.
* 'Enable', and 'Disable'.
*
* @since 2.8.0
*

View File

@ -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.

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41159';
$wp_version = '4.9-alpha-41160';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.