From 10ec70d2447a747ea33b88469bab76c7db3f08a1 Mon Sep 17 00:00:00 2001 From: scribu Date: Sat, 23 Oct 2010 11:22:00 +0000 Subject: [PATCH] Use row_actions() in WP_Plugins_Table. See #14579 git-svn-id: http://svn.automattic.com/wordpress/trunk@15924 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/default-list-tables.php | 10 ++++------ wp-admin/includes/list-table.php | 5 +++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/wp-admin/includes/default-list-tables.php b/wp-admin/includes/default-list-tables.php index c66ed076d4..70f1cfe05d 100644 --- a/wp-admin/includes/default-list-tables.php +++ b/wp-admin/includes/default-list-tables.php @@ -3606,12 +3606,10 @@ class WP_Plugins_Table extends WP_List_Table { "; - echo '
'; - foreach ( $actions as $action => $link ) { - $sep = end( $actions ) == $link ? '' : ' | '; - echo "$link$sep"; - } - echo "
+ + echo $this->row_actions( $actions, true ); + + echo " "; $plugin_meta = array(); if ( !empty( $plugin_data['Version'] ) ) diff --git a/wp-admin/includes/list-table.php b/wp-admin/includes/list-table.php index 25aaf57c7a..b945311c65 100644 --- a/wp-admin/includes/list-table.php +++ b/wp-admin/includes/list-table.php @@ -273,16 +273,17 @@ class WP_List_Table { * @access protected * * @param array $actions The list of actions + * @param bool $always_visible Wether the actions should be always visible * @return string */ - function row_actions( $actions ) { + function row_actions( $actions, $always_visible = false ) { $action_count = count( $actions ); $i = 0; if ( !$action_count ) return ''; - $out = '
'; + $out = '
'; foreach ( $actions as $action => $link ) { ++$i; ( $i == $action_count ) ? $sep = '' : $sep = ' | ';