From be026764a3a97de2a2bc67312458ae7e312da587 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 4 Aug 2014 18:48:07 +0000 Subject: [PATCH] Move plugin details link into the description area. fixes #17902. git-svn-id: https://develop.svn.wordpress.org/trunk@29371 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-plugins-list-table.php | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index 3acbc0f032..b6a6718ab6 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -405,15 +405,6 @@ class WP_Plugins_List_Table extends WP_List_Table { } // end if $screen->in_admin( 'network' ) - // Details link using API info, if available - if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && isset( $plugin_data['slug'] ) ) { - $actions['details'] = sprintf( '%s', - esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] . - '&TB_iframe=true&width=600&height=550' ) ), - esc_attr( sprintf( __( 'More information about %s' ), $plugin_data['Name'] ) ), - __( 'Details' ) ); - } - if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) $actions['edit'] = '' . __('Edit') . ''; } // end if $context @@ -517,8 +508,21 @@ class WP_Plugins_List_Table extends WP_List_Table { $author = '' . $plugin_data['Author'] . ''; $plugin_meta[] = sprintf( __( 'By %s' ), $author ); } - if ( ! empty( $plugin_data['PluginURI'] ) ) - $plugin_meta[] = '' . __( 'Visit plugin site' ) . ''; + + if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) ) { + // Details link using API info, if available + if ( isset( $plugin_data['slug'] ) ) { + $plugin_meta[] = sprintf( '%s', + esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] . + '&TB_iframe=true&width=600&height=550' ) ), + __( 'View details' ) ); + } elseif ( ! empty( $plugin_data['PluginURI'] ) ) { + $plugin_meta[] = sprintf( '%s', + esc_url( $plugin_data['PluginURI'] ), + __( 'Visit plugin site' ) + ); + } + } /** * Filter the array of row meta for each plugin in the Plugins list table.