From c84945ceeecd4adbf9f5c7ac0d68819bf9d29013 Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 16 May 2009 19:30:08 +0000 Subject: [PATCH] Always show action links for plugin rows. Move offsite links off of plugin name to new 'View Site' action. git-svn-id: http://svn.automattic.com/wordpress/trunk@11367 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/plugins.php | 19 +++++++++++++++---- wp-admin/wp-admin.css | 4 ++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index aa402c00c5..e26479f1ed 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -241,7 +241,7 @@ $current = get_transient( 'update_plugins' ); foreach ( (array)$all_plugins as $plugin_file => $plugin_data) { //Translate, Apply Markup, Sanitize HTML - $plugin_data = _get_plugin_data_markup_translate($plugin_file, $plugin_data, true, true); + $plugin_data = _get_plugin_data_markup_translate($plugin_file, $plugin_data, false, true); $all_plugins[ $plugin_file ] = $plugin_data; //Filter into individual sections @@ -360,6 +360,10 @@ function print_plugins_table($plugins, $context = '') { if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) $actions[] = '' . __('Edit') . ''; + if ( ! empty($plugin_data['PluginURI']) ) { + $actions[] = '' . __('View Site') . ''; + } + $actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context ); $actions = apply_filters( "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); $action_count = count($actions); @@ -367,9 +371,9 @@ function print_plugins_table($plugins, $context = '') { echo " - {$plugin_data['Title']}"; + {$plugin_data['Name']}"; $i = 0; - echo '
'; + echo '
'; foreach ( $actions as $action => $link ) { ++$i; ( $i == $action_count ) ? $sep = '' : $sep = ' | '; @@ -378,7 +382,14 @@ function print_plugins_table($plugins, $context = '') { echo '
'; echo " {$plugin_data['Version']} -

{$plugin_data['Description']}

"; +

{$plugin_data['Description']}"; + if ( !empty($plugin_data['Author']) ) { + $author = $plugin_data['Author']; + if ( !empty($plugin_data['AuthorURI']) ) + $author = '' . $plugin_data['Author'] . ''; + echo ' ' . sprintf( __('By: %s'), $author ) . ''; + } + echo "

"; echo ' '; do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context ); diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index ccc78f45c8..578e7ba259 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -792,6 +792,10 @@ div.comment-item:hover .row-actions { visibility: visible; } +.row-actions-visible { + padding: 2px 0 0; +} + /* Admin Header */ #wphead-info { margin: 0 0 0 15px;