Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/17/2016 08:34:39 PM (9 years ago)
Author:
boonebgorges
Message:

Use bp_get_group_name() instead of redefining filter in various places.

Reduces code duplication, and ensures that changes to filter parameters are
automatically applied to every instance of the filter.

Props garrett-eclipse.
See #6752. Fixes #7069.

File:
1 edited

Legend:

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

    r10770 r10775  
    569569    $group      = groups_get_group( 'group_id=' . (int) $_GET['gid'] );
    570570
    571     /** This filter is documented in bp-groups/bp-groups-template.php */
    572     $group_name = isset( $group->name ) ? apply_filters( 'bp_get_group_name', $group->name ) : '';
     571    $group_name = isset( $group->name ) ? bp_get_group_name( $group ) : '';
    573572
    574573    // Construct URL for form.
     
    698697        <ul class="bp-group-delete-list">
    699698        <?php foreach ( $groups['groups'] as $group ) : ?>
    700             <li><?php echo apply_filters( 'bp_get_group_name', $group->name, $group ); ?></li>
     699            <li><?php echo esc_html( bp_get_group_name( $group ) ); ?></li>
    701700        <?php endforeach; ?>
    702701        </ul>
Note: See TracChangeset for help on using the changeset viewer.