Changeset 8421
- Timestamp:
- 05/16/2014 09:32:19 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-admin.php
r8417 r8421 732 732 */ 733 733 function bp_groups_admin_edit_metabox_members( $item ) { 734 global $members_template;735 734 736 735 // Pull up a list of group members, so we can separate out the types … … 752 751 753 752 foreach ( $members as $type => &$member_type_users ) { 754 $page_qs_key = $type . '_page';753 $page_qs_key = $type . '_page'; 755 754 $current_type_page = isset( $_GET[ $page_qs_key ] ) ? absint( $_GET[ $page_qs_key ] ) : 1; 756 755 $member_type_query = new BP_Group_Member_Query( array( … … 762 761 ) ); 763 762 764 $member_type_users = $member_type_query->results; 765 763 $member_type_users = $member_type_query->results; 766 764 $pagination[ $type ] = bp_groups_admin_create_pagination_links( $member_type_query, $type ); 767 765 } 768 766 769 767 // Echo out the javascript variable 770 echo '<script type="text/javascript">var group_id = "' . $item->id. '";</script>';768 echo '<script type="text/javascript">var group_id = "' . esc_js( $item->id ) . '";</script>'; 771 769 772 770 // Loop through each member type … … 775 773 <div class="bp-groups-member-type" id="bp-groups-member-type-<?php echo esc_attr( $member_type ) ?>"> 776 774 777 <h4> 778 <?php switch ( $member_type ) : 779 case 'admin' : _e( 'Administrators', 'buddypress' ); break; 780 case 'mod' : _e( 'Moderators', 'buddypress' ); break; 781 case 'member' : _e( 'Members', 'buddypress' ); break; 782 case 'banned' : _e( 'Banned Users', 'buddypress' ); break; 783 endswitch; ?> 784 </h4> 775 <h4><?php switch ( $member_type ) : 776 case 'admin' : esc_html_e( 'Administrators', 'buddypress' ); break; 777 case 'mod' : esc_html_e( 'Moderators', 'buddypress' ); break; 778 case 'member' : esc_html_e( 'Members', 'buddypress' ); break; 779 case 'banned' : esc_html_e( 'Banned Members', 'buddypress' ); break; 780 endswitch; ?></h4> 785 781 786 782 <div class="bp-group-admin-pagination table-top"> … … 792 788 <table class="widefat bp-group-members"> 793 789 <thead> 794 <tr>795 <th scope="col" class="uid-column"><?php _ex( 'ID', 'Group member user_id in group admin', 'buddypress' )?></th>796 <th scope="col" class="uname-column"><?php _ex( 'Name', 'Group member name in group admin', 'buddypress' )?></th>797 <th scope="col" class="urole-column"><?php _ex( 'Group Role', 'Group member role in group admin', 'buddypress' )?></th>798 </tr>790 <tr> 791 <th scope="col" class="uid-column"><?php _ex( 'ID', 'Group member user_id in group admin', 'buddypress' ); ?></th> 792 <th scope="col" class="uname-column"><?php _ex( 'Name', 'Group member name in group admin', 'buddypress' ); ?></th> 793 <th scope="col" class="urole-column"><?php _ex( 'Group Role', 'Group member role in group admin', 'buddypress' ); ?></th> 794 </tr> 799 795 </thead> 800 796 … … 812 808 ) ); ?></a> 813 809 814 <span style="margin: 8px; float: left;"><?php echo bp_core_get_userlink( $type_user->ID ) ?></span>810 <span style="margin: 8px; float: left;"><?php echo bp_core_get_userlink( $type_user->ID ); ?></span> 815 811 </td> 816 812 817 813 <td class="urole-column"> 818 814 <select class="bp-groups-role" id="bp-groups-role-<?php echo esc_attr( $type_user->ID ); ?>" name="bp-groups-role[<?php echo esc_attr( $type_user->ID ); ?>]"> 819 <option value="admin" <?php selected( 'admin', $member_type ) ?>><?php _e( 'Administrator', 'buddypress' ) ?></option> 820 <option value="mod" <?php selected( 'mod', $member_type ) ?>><?php _e( 'Moderator', 'buddypress' ) ?></option> 821 <option value="member" <?php selected( 'member', $member_type ) ?>><?php _e( 'Member', 'buddypress' ) ?></option> 822 <option class="banned" value="banned" <?php selected( 'banned', $member_type ) ?>><?php _e( 'Banned', 'buddypress' ) ?></option> 823 <option class="remove" value="remove"><?php _e( 'Remove From Group', 'buddypress' ) ?></option> 815 <optgroup label="<?php esc_attr_e( 'Roles', 'buddypress' ); ?>"> 816 <option class="admin" value="admin" <?php selected( 'admin', $member_type ); ?>><?php esc_html_e( 'Administrator', 'buddypress' ); ?></option> 817 <option class="mod" value="mod" <?php selected( 'mod', $member_type ); ?>><?php esc_html_e( 'Moderator', 'buddypress' ); ?></option> 818 <option class="member" value="member" <?php selected( 'member', $member_type ); ?>><?php esc_html_e( 'Member', 'buddypress' ); ?></option> 819 <?php if ( 'banned' === $member_type ) : ?> 820 <option class="banned" value="banned" <?php selected( 'banned', $member_type ); ?>><?php esc_html_e( 'Banned', 'buddypress' ); ?></option> 821 <?php endif; ?> 822 </optgroup> 823 <optgroup label="<?php esc_attr_e( 'Actions', 'buddypress' ); ?>"> 824 <option class="remove" value="remove"><?php esc_html_e( 'Remove', 'buddypress' ); ?></option> 825 <?php if ( 'banned' !== $member_type ) : ?> 826 <option class="banned" value="banned"><?php esc_html_e( 'Ban', 'buddypress' ); ?></option> 827 <?php endif; ?> 828 </optgroup> 824 829 </select> 825 830 … … 830 835 * 831 836 * @todo remove this, and do database detection on save 832 */ ?> 837 */ 838 ?> 833 839 <input type="hidden" name="bp-groups-existing-role[<?php echo esc_attr( $type_user->ID ); ?>]" value="<?php echo esc_attr( $member_type ); ?>" /> 834 840 </td> … … 849 855 850 856 <div class="bp-group-admin-pagination table-bottom"> 851 <?php echo $pagination[ $member_type ] ?>857 <?php echo $pagination[ $member_type ]; ?> 852 858 </div> 853 859 854 860 <?php else : ?> 855 861 856 <p class="bp-groups-no-members description"><?php _e( 'No members of this type', 'buddypress' )?></p>862 <p class="bp-groups-no-members description"><?php esc_html_e( 'No members of this type', 'buddypress' ); ?></p> 857 863 858 864 <?php endif; ?> … … 861 867 862 868 <?php endforeach; 863 864 869 } 865 870
Note: See TracChangeset
for help on using the changeset viewer.