Contents
bp_is_my_profile()
Is the current page part of the profile of the logged-in user?
Description
Will return true for any subpage of the logged-in user’s profile, eg http://example.com/members/joe/friends/.
Return
(bool) True if the current page is part of the profile of the logged-in user.
Source
File: bp-core/bp-core-template.php
function bp_is_my_profile() { if ( is_user_logged_in() && bp_loggedin_user_id() == bp_displayed_user_id() ) { $my_profile = true; } else { $my_profile = false; } /** * Filters whether or not current page is part of the profile for the logged-in user. * * @since BuddyPress 1.2.4 * * @param bool $my_profile Whether or not current page is part of the profile for the logged-in user. */ return apply_filters( 'bp_is_my_profile', $my_profile ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.2.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-core/bp-core-template.php: bp_is_my_profile |
Filters whether or not current page is part of the profile for the logged-in user. |
bp-core/bp-core-template.php: bp_loggedin_user_id() |
Get the ID of the currently logged-in user. |
bp-core/bp-core-template.php: bp_displayed_user_id() |
Get the ID of the currently displayed user. |
Used By | Description |
---|---|
bp-document/screens/folders.php: document_screen_single_folder() |
Load an individual folder screen. |
bp-document/classes/class-bp-document-component.php: BP_Document_Component::setup_title() |
Set up the title for pages and |
bp-document/bp-document-template.php: bp_has_folders() |
Initialize the folder loop. |
bp-document/bp-document-functions.php: folders_check_folder_access() |
Check folder access for current user or guest |
bp-xprofile/classes/class-bp-xprofile-profile-completion-widget.php: BP_Xprofile_Profile_Completion_Widget::widget() |
Displays the widget. |
bp-media/bp-media-functions.php: bp_media_query_privacy() |
Get list of privacy based on user and group. |
bp-groups/screens/single/folders.php: document_screen_group_single_folder() |
Load an individual folder screen. |
bp-settings/actions/capabilities.php: bp_settings_action_capabilities() |
Handles the setting of user capabilities, spamming, hamming, role, etc. |
bp-settings/classes/class-bp-settings-component.php: BP_Settings_Component::setup_nav() |
Set up navigation. |
bp-settings/actions/general.php: bp_settings_action_general() |
Handles the changing and saving of user email addresses and passwords. |
bp-settings/actions/general.php: bp_settings_verify_email_change() |
Process email change verification or cancel requests. |
bp-settings/actions/notifications.php: bp_settings_action_notifications() |
Handles the changing and saving of user notification settings. |
bp-forums/members.php: BBP_BuddyPress_Members::set_member_forum_query_vars() |
Set favorites and subscriptions query variables if viewing member profile pages. |
bp-forums/classes/class-bp-forums-component.php: BP_Forums_Component::setup_nav() |
Setup BuddyBar navigation |
bp-forums/classes/class-bp-forums-component.php: BP_Forums_Component::setup_title() |
Sets up the title for pages and |
bp-forums/functions.php: bbp_filter_is_user_home() |
Filter the Forums is_user_home function with BuddyBoss equivalent |
bp-media/bp-media-template.php: bp_has_albums() |
Initialize the album loop. |
bp-media/screens/albums.php: media_screen_single_album() |
Load an individual album screen. |
bp-media/bp-media-functions.php: albums_check_album_access() |
Check album access for current user or guest |
bp-media/classes/class-bp-media-component.php: BP_Media_Component::setup_title() |
Set up the title for pages and |
bp-notifications/classes/class-bp-notifications-component.php: BP_Notifications_Component::setup_title() |
Set up the title for pages and |
bp-blogs/bp-blogs-template.php: bp_create_blog_link() |
Output a “Create a Site” link for users viewing their own profiles. |
bp-blogs/bp-blogs-template.php: bp_blogs_blog_tabs() |
Output navigation tabs for a user Blogs page. |
bp-blogs/classes/class-bp-blogs-component.php: BP_Blogs_Component::setup_title() |
Set up the title for pages and |
bp-blogs/classes/class-bp-blogs-blog.php: BP_Blogs_Blog::get_blogs_for_user() |
Get all of a user’s blogs, as tracked by BuddyPress. |
bp-xprofile/bp-xprofile-template.php: bp_has_profile() |
Query for XProfile groups and fields. |
bp-xprofile/screens/change-avatar.php: xprofile_screen_change_avatar() |
Handles the uploading and cropping of a user avatar. Displays the change avatar page. |
bp-xprofile/screens/change-cover-image.php: xprofile_screen_change_cover_image() |
Displays the change cover photo page. |
bp-xprofile/screens/edit.php: xprofile_screen_edit_profile() |
Handles the display of the profile edit page by loading the correct template file. |
bp-xprofile/actions/delete-avatar.php: xprofile_action_delete_avatar() |
Deletes the active avatar for a user. |
bp-xprofile/classes/class-bp-xprofile-component.php: BP_XProfile_Component::setup_title() |
Sets up the title for pages and |
bp-xprofile/bp-xprofile-settings.php: bp_xprofile_settings_add_feedback_message() |
Adds feedback messages when successfully saving profile field settings. |
bp-messages/screens/view.php: messages_screen_conversation() |
Load an individual conversation screen. |
bp-messages/actions/view.php: messages_action_conversation() |
Process a request to view a single message thread. |
bp-messages/classes/class-bp-messages-component.php: BP_Messages_Component::setup_nav() |
Set up navigation for user pages. |
bp-messages/classes/class-bp-messages-component.php: BP_Messages_Component::setup_title() |
Set up the title for pages and |
bp-messages/bp-messages-template.php: bp_get_send_private_message_link() |
Generate the URL for the Private Message link in member profile headers. |
bp-messages/bp-messages-notifications.php: bp_messages_screen_conversation_mark_notifications() |
Mark new message notification when member reads a message thread directly. |
bp-groups/classes/class-bp-groups-member.php: BP_Groups_Member::get_random_groups() |
Get a list of randomly selected IDs of groups that the member belongs to. |
bp-groups/classes/class-bp-groups-component.php: BP_Groups_Component::setup_title() |
Set up the title for pages and |
bp-members/bp-members-adminbar.php: bp_members_admin_bar_user_admin_menu() |
Add the User Admin top-level menu to user pages. |
bp-members/bp-members-functions.php: bp_core_can_edit_settings() |
Check whether the logged-in user can edit settings for the displayed user. |
bp-members/classes/class-bp-members-component.php: BP_Members_Component::setup_title() |
Set up the title for pages and |
bp-members/classes/class-bp-members-component.php: BP_Members_Component::setup_canonical_stack() |
Set up canonical stack for this component. |
bp-members/classes/class-bp-core-members-switching.php: BP_Core_Members_Switching::maybe_switch_url() |
Returns the switch to or switch back URL for a given user. |
bp-members/bp-members-template.php: bp_get_add_switch_button() |
Returns a view as/back to button for a given user depending on the switching status. |
bp-members/bp-members-template.php: bp_get_displayed_user_nav() |
Render the navigation markup for the displayed user. |
bp-members/bp-members-template.php: bp_get_loggedin_user_nav() |
Render the navigation markup for the logged-in user. |
bp-invites/actions/revoke-invite-admin.php: bp_member_revoke_invite_admin() |
Admin revoke email invite. |
bp-invites/actions/revoke-invite.php: bp_member_revoke_invite() |
Member revoke email invite. |
bp-invites/actions/invites.php: bp_member_invite_submit() |
Member submit email invite. |
bp-friends/classes/class-bp-friends-component.php: BP_Friends_Component::setup_nav() |
Set up component navigation. |
bp-friends/classes/class-bp-friends-component.php: BP_Friends_Component::setup_title() |
Set up the title for pages and |
bp-templates/bp-nouveau/includes/friends/ajax.php: bp_nouveau_ajax_addremove_friend() |
Friend/un-friend a user via a POST request. |
bp-templates/bp-nouveau/includes/activity/functions.php: bp_nouveau_activity_localize_scripts() |
Localize the strings needed for the Activity Post form UI |
bp-templates/bp-nouveau/includes/messages/functions.php: bp_nouveau_messages_adjust_nav() |
Adjust message navigation for notices and composing. |
bp-templates/bp-nouveau/includes/groups/ajax.php: bp_nouveau_ajax_joinleave_group() |
Join or leave a group when clicking the “join/leave” button via a POST request. |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_groups_screen_invites_restriction() |
Group invites restriction screen. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_has_nav() |
Init the Navigation Loop and check it has items. |
bp-templates/bp-nouveau/includes/functions.php: bp_nouveau_get_user_feedback() |
All user feedback messages are available here |
bp-core/deprecated/buddypress/2.1.php: bp_members_adminbar_admin_menu() |
Add a member admin menu to the BuddyBar. |
bp-core/deprecated/buddypress/1.5.php: bp_is_home() | |
bp-core/deprecated/buddypress/3.0.php: bp_core_action_set_spammer_status() |
Catch a “Mark as Spammer/Not Spammer” click from the toolbar. |
bp-core/deprecated/buddypress/3.0.php: bp_core_action_delete_user() |
Process user deletion requests. |
bp-core/bp-core-template.php: bp_get_the_body_class() |
Customize the body class, according to the currently displayed BP content. |
bp-core/bp-core-template.php: bp_user_has_access() |
Returns whether or not a user has access. |
bp-core/classes/class-bp-button.php: BP_Button::__construct() |
Builds the button based on class parameters. |
bp-core/bp-core-buddybar.php: bp_core_maybe_hook_new_subnav_screen_function() |
For a given subnav item, either hook the screen function or generate redirect arguments, as necessary. |
bp-activity/screens/mentions.php: bp_activity_reset_my_new_mentions() |
Reset the logged-in user’s new mentions data when he visits his mentions screen. |
bp-activity/classes/class-bp-activity-component.php: BP_Activity_Component::setup_nav() |
Set up component navigation. |
bp-activity/classes/class-bp-activity-component.php: BP_Activity_Component::setup_title() |
Set up the title for pages and |
bp-activity/bp-activity-template.php: bp_get_send_public_message_link() |
Return the public message link for the displayed user. |
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.