Skip to:
Content

BuddyPress.org

Changeset 6657


Ignore:
Timestamp:
12/25/2012 09:01:15 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Group Admin:

  • Remove group ID column from Groups admin UI.
  • Add missing bp_groups_admin_screen_options() function.
File:
1 edited

Legend:

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

    r6654 r6657  
    364364        exit;
    365365    }
     366}
     367
     368/**
     369 * Handle save/update of screen options for the Groups component admin screen
     370 *
     371 * @since BuddyPress (1.7)
     372 *
     373 * @param string $value Will always be false unless another plugin filters it first.
     374 * @param string $option Screen option name
     375 * @param string $new_value Screen option form value
     376 * @return string Option value. False to abandon update.
     377 */
     378function bp_groups_admin_screen_options( $value, $option, $new_value ) {
     379    if ( 'toplevel_page_bp_groups_per_page' != $option && 'toplevel_page_bp_groups_network_per_page' != $option )
     380        return $value;
     381
     382    // Per page
     383    $new_value = (int) $new_value;
     384    if ( $new_value < 1 || $new_value > 999 )
     385        return $value;
     386
     387    return $new_value;
    366388}
    367389
     
    744766                <thead>
    745767                <tr>
    746                     <th scope="col" class="uid-column"><?php _ex( 'ID', 'Group member user_id in group admin', 'buddypress' ) ?></th>
    747768                    <th scope="col" class="uname-column"><?php _ex( 'Name', 'Group member name in group admin', 'buddypress' ) ?></th>
    748769                    <th scope="col" class="urole-column"><?php _ex( 'Group Role', 'Group member role in group admin', 'buddypress' ) ?></th>
     
    11311152        return array(
    11321153            'cb'          => '<input name type="checkbox" />',
    1133             'gid'         => _x( 'ID', 'Groups admin Group ID column header', 'buddypress' ),
    11341154            'comment'     => _x( 'Name', 'Groups admin Group Name column header', 'buddypress' ),
    11351155            'description' => _x( 'Description', 'Groups admin Group Description column header', 'buddypress' ),
Note: See TracChangeset for help on using the changeset viewer.