Changeset 9723 for trunk/src/bp-members/bp-members-template.php
- Timestamp:
- 04/09/2015 03:31:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-template.php
r9698 r9723 516 516 } 517 517 518 $member_type = bp_get_current_member_type(); 519 if ( ! $member_type && ! empty( $_GET['member_type'] ) ) { 520 if ( is_array( $_GET['member_type'] ) ) { 521 $member_type = $_GET['member_type']; 522 } else { 523 // Can be a comma-separated list. 524 $member_type = explode( ',', $_GET['member_type'] ); 525 } 526 } 527 518 528 // type: active ( default ) | random | newest | popular | online | alphabetical 519 529 $r = bp_parse_args( $args, array( … … 529 539 530 540 'user_id' => $user_id, // Pass a user_id to only show friends of this user 531 'member_type' => '',541 'member_type' => $member_type, 532 542 'search_terms' => null, // Pass search_terms to filter users by their profile data 533 543 … … 1797 1807 return apply_filters( 'bp_get_loggedin_user_username', $username ); 1798 1808 } 1809 /** 1810 * Echo the current member type message. 1811 * 1812 * @since BuddyPress (2.3.0) 1813 */ 1814 function bp_current_member_type_message() { 1815 echo bp_get_current_member_type_message(); 1816 } 1817 /** 1818 * Generate the current member type message. 1819 * 1820 * @since BuddyPress (2.3.0) 1821 * 1822 * @return string 1823 */ 1824 function bp_get_current_member_type_message() { 1825 $type_object = bp_get_member_type_object( bp_get_current_member_type() ); 1826 1827 $message = sprintf( __( 'Viewing members of the type: %s', 'buddypress' ), '<strong>' . $type_object->labels['singular_name'] . '</strong>' ); 1828 1829 return apply_filters( 'bp_get_current_member_type_message', $message ); 1830 } 1799 1831 1800 1832 /** Signup Form ***************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.