Use row_actions() in WP_Plugins_Table. See #14579
git-svn-id: http://svn.automattic.com/wordpress/trunk@15924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6fca3408b6
commit
10ec70d244
|
@ -3606,12 +3606,10 @@ class WP_Plugins_Table extends WP_List_Table {
|
|||
<tr class='$class second'>
|
||||
<td></td>
|
||||
<td class='plugin-title'>";
|
||||
echo '<div class="row-actions-visible">';
|
||||
foreach ( $actions as $action => $link ) {
|
||||
$sep = end( $actions ) == $link ? '' : ' | ';
|
||||
echo "<span class='$action'>$link$sep</span>";
|
||||
}
|
||||
echo "</div></td>
|
||||
|
||||
echo $this->row_actions( $actions, true );
|
||||
|
||||
echo "</td>
|
||||
<td class='desc'>";
|
||||
$plugin_meta = array();
|
||||
if ( !empty( $plugin_data['Version'] ) )
|
||||
|
|
|
@ -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 = '<div class="row-actions">';
|
||||
$out = '<div class="' . ( $always_visible ? 'row-actions-visible' : 'row-actions' ) . '">';
|
||||
foreach ( $actions as $action => $link ) {
|
||||
++$i;
|
||||
( $i == $action_count ) ? $sep = '' : $sep = ' | ';
|
||||
|
|
Loading…
Reference in New Issue