Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/26/2015 03:48:22 PM (10 years ago)
Author:
djpaul
Message:

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

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

File:
1 edited

Legend:

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

    r10007 r10066  
    14111411
    14121412    <?php
     1413    }
     1414
     1415    /**
     1416     * Override WP_List_Table::row_actions().
     1417     *
     1418     * Basically a duplicate of the row_actions() method, but removes the
     1419     * unnecessary <button> addition.
     1420     *
     1421     * @since 2.3.3
     1422     * @access protected
     1423     *
     1424     * @param array $actions The list of actions
     1425     * @param bool $always_visible Whether the actions should be always visible
     1426     * @return string
     1427     */
     1428    protected function row_actions( $actions, $always_visible = false ) {
     1429        $action_count = count( $actions );
     1430        $i = 0;
     1431
     1432        if ( !$action_count )
     1433            return '';
     1434
     1435        $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
     1436        foreach ( $actions as $action => $link ) {
     1437            ++$i;
     1438            ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
     1439            $out .= "<span class='$action'>$link$sep</span>";
     1440        }
     1441        $out .= '</div>';
     1442
     1443        return $out;
    14131444    }
    14141445
Note: See TracChangeset for help on using the changeset viewer.