This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hide Users from BuddyPress Members List by User role. | |
| * | |
| * @param array $args Args. | |
| * | |
| * @return array | |
| */ | |
| function wbcom_hide_members_from_member_lists_by_user_role( $args ) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hide users from BuddyPress members list. | |
| * | |
| * @param array $args Args. | |
| * | |
| * @return array | |
| */ | |
| function wbcom_exclude_members_from_member_directory_page( $args ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Sidewide activity stream only for friends. | |
| * | |
| * @param array $args Arguments. | |
| */ | |
| function wbcom_friends_only_activity_args( $args ) { | |
| if ( ! bp_is_activity_directory() || ! is_user_logged_in() || ! empty( $args['scope'] ) ) { | |
| return $args; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Sets the size of buddypress profile cover image. | |
| * | |
| * @param int $size size in bytes. | |
| * @param string $type upload type(avatar, cover_upload). | |
| * | |
| * @return float|int | |
| */ | |
| function wbcom_sets_size_of_bp_cover_image( $size, $type ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Sets the size of buddypress profile avatar. | |
| * | |
| * @param int $size size in bytes. | |
| * @param string $type upload type(avatar, cover_upload). | |
| * | |
| * @return int | |
| */ | |
| function wbcom_sets_size_of_bp_avatar( $size, $type ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Sets the file types for upload BuddyPress User and Group Cover Image. | |
| * | |
| * @param array $exts extensions. | |
| * @param string $type attachment type. | |
| * | |
| * @return array | |
| */ | |
| function wbcom_set_file_type_for_bp_profile_cover_image( $exts, $type ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Sets the file types for upload bp profile avatar. | |
| * | |
| * @param array $exts extensions. | |
| * @param string $type attachment type. | |
| * | |
| * @return array | |
| */ | |
| function wbcom_set_file_type_for_bp_profile_avatar( $exts, $type ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hide member directory page for specific user roles. | |
| */ | |
| function wbcom_hide_member_directory_page_for_specific_user_role() { | |
| if ( ! bp_is_members_directory() ) { | |
| return; | |
| } | |
| if ( ! is_user_logged_in() ) { | |
| bp_do_404(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Add bp profile navigation for create group. | |
| */ | |
| function wbcom_add_bp_profile_tab_for_create_group() { | |
| if ( ! bp_is_my_profile() ) { | |
| return; | |
| } | |
| $slug = bp_get_groups_slug(); |