Skip to:
Content

BuddyPress.org

Ticket #6465: 6465.duplicate-button-markup.patch

File 6465.duplicate-button-markup.patch, 2.3 KB (added by r-a-y, 11 years ago)
  • src/bp-activity/bp-activity-admin.php

    diff --git src/bp-activity/bp-activity-admin.php src/bp-activity/bp-activity-admin.php
    index 1e28ca8..2abe754 100644
    class BP_Activity_List_Table extends WP_List_Table {  
    14251425        }
    14261426
    14271427        /**
     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;
     1456        }
     1457
     1458        /**
    14281459         * Checkbox column markup.
    14291460         *
    14301461         * @since BuddyPress (1.6.0)
  • src/bp-groups/bp-groups-admin.php

    diff --git src/bp-groups/bp-groups-admin.php src/bp-groups/bp-groups-admin.php
    index 66cae04..41be4e3 100644
    class BP_Groups_List_Table extends WP_List_Table {  
    14911491        }
    14921492
    14931493        /**
     1494         * Override WP_List_Table::row_actions().
     1495         *
     1496         * Basically a duplicate of the row_actions() method, but removes the
     1497         * unnecessary <button> addition.
     1498         *
     1499         * @since 2.3.3
     1500         * @access protected
     1501         *
     1502         * @param array $actions The list of actions
     1503         * @param bool $always_visible Whether the actions should be always visible
     1504         * @return string
     1505         */
     1506        protected function row_actions( $actions, $always_visible = false ) {
     1507                $action_count = count( $actions );
     1508                $i = 0;
     1509
     1510                if ( !$action_count )
     1511                        return '';
     1512
     1513                $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
     1514                foreach ( $actions as $action => $link ) {
     1515                        ++$i;
     1516                        ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
     1517                        $out .= "<span class='$action'>$link$sep</span>";
     1518                }
     1519                $out .= '</div>';
     1520
     1521                return $out;
     1522        }
     1523
     1524        /**
    14941525         * Markup for the Checkbox column.
    14951526         *
    14961527         * @since BuddyPress (1.7.0)