Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/26/2015 03:44:12 PM (9 years ago)
Author:
djpaul
Message:

Activity, Groups: fix styling compatibility problems introduced by WordPress 4.3.

Fixes #6465 (trunk). Props r-a-y, mercime.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-admin.php

    r10008 r10065  
    14231423
    14241424    <?php
     1425    }
     1426
     1427    /**
     1428     * Override WP_List_Table::row_actions().
     1429     *
     1430     * Basically a duplicate of the row_actions() method, but removes the
     1431     * unnecessary <button> addition.
     1432     *
     1433     * @since 2.3.3
     1434     * @access protected
     1435     *
     1436     * @param array $actions The list of actions
     1437     * @param bool $always_visible Whether the actions should be always visible
     1438     * @return string
     1439     */
     1440    protected function row_actions( $actions, $always_visible = false ) {
     1441        $action_count = count( $actions );
     1442        $i = 0;
     1443
     1444        if ( !$action_count )
     1445            return '';
     1446
     1447        $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
     1448        foreach ( $actions as $action => $link ) {
     1449            ++$i;
     1450            ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
     1451            $out .= "<span class='$action'>$link$sep</span>";
     1452        }
     1453        $out .= '</div>';
     1454
     1455        return $out;
    14251456    }
    14261457
Note: See TracChangeset for help on using the changeset viewer.