BP_Members_Theme_Compat::is_members()
Are we looking at something that needs members theme compatibility?
Description
Source
File: bp-members/classes/class-bp-members-theme-compat.php
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | public function is_members() { // Bail if not looking at the members component or a user's page. if ( ! bp_is_members_component() && ! bp_is_user() ) { return ; } // User page. if ( bp_is_user() ) { // If we're on a single activity permalink page, we shouldn't use the members // template, so stop here! if ( bp_is_active( 'activity' ) && bp_is_single_activity() ) { return ; } /** * Fires if looking at Members user page when needing theme compat. * * @since BuddyPress 1.5.0 */ do_action( 'bp_members_screen_display_profile' ); add_filter( 'bp_get_buddypress_template' , array ( $this , 'single_template_hierarchy' ) ); add_action( 'bp_template_include_reset_dummy_post_data' , array ( $this , 'single_dummy_post' ) ); add_filter( 'bp_replace_the_content' , array ( $this , 'single_dummy_content' ) ); // Members Directory. } elseif ( ! bp_current_action() && ! bp_current_item() ) { bp_update_is_directory( true, 'members' ); /** * Fires if looking at Members directory when needing theme compat. * * @since BuddyPress 1.5.0 */ do_action( 'bp_members_screen_index' ); add_filter( 'bp_get_buddypress_template' , array ( $this , 'directory_template_hierarchy' ) ); add_action( 'bp_template_include_reset_dummy_post_data' , array ( $this , 'directory_dummy_post' ) ); add_filter( 'bp_replace_the_content' , array ( $this , 'directory_content' ) ); } } |
Changelog
Version | Description |
---|---|
BuddyPress 1.7.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.