diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php
index ef1ab91b3d..acf5f8f953 100644
--- a/src/wp-admin/includes/class-wp-ms-themes-list-table.php
+++ b/src/wp-admin/includes/class-wp-ms-themes-list-table.php
@@ -399,18 +399,82 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
if ( ! $allowed ) {
if ( ! $theme->errors() ) {
- $actions['enable'] = '' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '';
+ $url = add_query_arg( array(
+ 'action' => 'enable',
+ 'theme' => $theme_key,
+ 'paged' => $page,
+ 's' => $s,
+ ), $url );
+
+ if ( $this->is_site_themes ) {
+ /* translators: %s: theme name */
+ $aria_label = sprintf( __( 'Enable %s' ), $theme->display( 'Name' ) );
+ } else {
+ /* translators: %s: theme name */
+ $aria_label = sprintf( __( 'Network Enable %s' ), $theme->display( 'Name' ) );
+ }
+
+ $actions['enable'] = sprintf( '%s',
+ esc_url( wp_nonce_url( $url, 'enable-theme_' . $stylesheet ) ),
+ esc_attr( $aria_label ),
+ ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) )
+ );
}
} else {
- $actions['disable'] = '' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '';
+ $url = add_query_arg( array(
+ 'action' => 'disable',
+ 'theme' => $theme_key,
+ 'paged' => $page,
+ 's' => $s,
+ ), $url );
+
+ if ( $this->is_site_themes ) {
+ /* translators: %s: theme name */
+ $aria_label = sprintf( __( 'Disable %s' ), $theme->display( 'Name' ) );
+ } else {
+ /* translators: %s: theme name */
+ $aria_label = sprintf( __( 'Network Disable %s' ), $theme->display( 'Name' ) );
+ }
+
+ $actions['disable'] = sprintf( '%s',
+ esc_url( wp_nonce_url( $url, 'disable-theme_' . $stylesheet ) ),
+ esc_attr( $aria_label ),
+ ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) )
+ );
}
if ( current_user_can('edit_themes') ) {
- $actions['edit'] = '' . __('Edit') . '';
+ $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( '%s',
+ 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' ) ) {
- $actions['delete'] = '' . __( 'Delete' ) . '';
+ $url = add_query_arg( array(
+ 'action' => 'delete-selected',
+ 'checked[]' => $theme_key,
+ 'theme_status' => $context,
+ 'paged' => $page,
+ 's' => $s,
+ ), 'themes.php' );
+
+ /* translators: %s: theme name */
+ $aria_label = sprintf( __( 'Delete %s' ), $theme->display( 'Name' ) );
+
+ $actions['delete'] = sprintf( '%s',
+ esc_url( wp_nonce_url( $url, 'bulk-themes' ) ),
+ esc_attr( $aria_label ),
+ __( 'Delete' )
+ );
}
/**
* Filter the action links displayed for each theme in the Multisite
@@ -495,7 +559,14 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
$theme_meta[] = sprintf( __( 'By %s' ), $theme->display('Author') );
if ( $theme->get('ThemeURI') ) {
- $theme_meta[] = '' . __( 'Visit Theme Site' ) . '';
+ /* translators: %s: theme name */
+ $aria_label = sprintf( __( 'Visit %s homepage' ), $theme->display( 'Name' ) );
+
+ $theme_meta[] = sprintf( '%s',
+ $theme->display( 'ThemeURI' ),
+ esc_attr( $aria_label ),
+ __( 'Visit Theme Site' )
+ );
}
/**
* Filter the array of row meta for each theme in the Multisite themes