From 58b22fce7dbb51e2a353fc0c70a4abf6ff305017 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 4 Aug 2014 18:49:17 +0000 Subject: [PATCH] Move plugin details link into the description area. fixes #17902. Built from https://develop.svn.wordpress.org/trunk@29371 git-svn-id: http://core.svn.wordpress.org/trunk@29149 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../includes/class-wp-plugins-list-table.php | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index 3acbc0f032..b6a6718ab6 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/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.