bp_is_my_profile()
Is the current page part of the profile of the logged-in user?
Description #Description
Will return true for any subpage of the logged-in user’s profile, eg http://example.com/members/joe/friends/.
Return #Return
(bool) True if the current page is part of the profile of the logged-in user.
Source #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 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 ); }
Expand full source code Collapse full source code View on Trac
Related #Related
Uses #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 #Used By
Used By | Description |
---|---|
bp-core/classes/class-bp-button.php: BP_Button::__construct() |
Builds the button based on class parameters. |
bp-core/deprecated/3.0.php: bp_core_action_set_spammer_status() |
Catch a “Mark as Spammer/Not Spammer” click from the toolbar. |
bp-core/deprecated/3.0.php: bp_core_action_delete_user() |
Process user deletion requests. |
bp-core/deprecated/1.5.php: bp_is_home() | |
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/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/classes/class-bp-activity-component.php: BP_Activity_Component::setup_title() |
Set up the title for pages and |
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/bp-activity-template.php: bp_get_send_public_message_link() |
Return the public message link for the displayed user. |
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-blog.php: BP_Blogs_Blog::get_blogs_for_user() |
Get all of a user’s blogs, as tracked by BuddyPress. |
bp-blogs/classes/class-bp-blogs-component.php: BP_Blogs_Component::setup_title() |
Set up the title for pages and |
bp-settings/classes/class-bp-settings-component.php: BP_Settings_Component::setup_nav() |
Set up navigation. |
bp-settings/actions/capabilities.php: bp_settings_action_capabilities() |
Handles the setting of user capabilities, spamming, hamming, role, etc. |
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-members/bp-members-invitations.php: bp_members_invitations_setup_nav() |
Set up the displayed user’s Members Invitations nav. |
bp-settings/actions/notifications.php: bp_settings_action_notifications() |
Handles the changing and saving of user notification settings. |
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/classes/class-bp-members-component.php: BP_Members_Component::setup_title() |
Set up the title for pages and |
bp-members/screens/change-cover-image.php: bp_members_screen_change_cover_image() |
Handle the display of the profile Change Cover Image page by loading the correct template file. |
bp-members/screens/change-avatar.php: bp_members_screen_change_avatar() |
Handle the display of the profile Change Avatar page by loading the correct template file. |
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-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/actions/delete-avatar.php: bp_members_action_delete_avatar() |
This function runs when an action is set for a screen: example.com/members/andy/profile/change-avatar/ [delete-avatar] |
bp-members/actions/invitations-bulk-manage.php: bp_members_invitations_action_bulk_manage() |
Handles bulk management (resend, cancellation) of invitations. |
bp-templates/bp-nouveau/includes/activity/template-tags.php: bp_nouveau_activity_member_post_form() |
Display the displayed user activity post form if needed |
bp-templates/bp-nouveau/includes/functions.php: bp_nouveau_get_user_feedback() |
All user feedback messages are available here |
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/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/messages/functions.php: bp_nouveau_messages_adjust_nav() | |
bp-templates/bp-nouveau/includes/messages/functions.php: bp_nouveau_push_sitewide_notices() |
Add active sitewide notices to the BP template_message global. |
bp-templates/bp-nouveau/includes/friends/ajax.php: bp_nouveau_ajax_addremove_friend() |
Friend/un-friend a user via a POST request. |
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-notifications.php: bp_messages_screen_conversation_mark_notifications() |
Mark new message notification when member reads a message thread directly. |
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/bp-messages-template.php: bp_get_send_private_message_link() |
Generate the URL for the Private Message link in member profile headers. |
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-xprofile/bp-xprofile-template.php: bp_has_profile() |
Query for XProfile groups and fields. |
bp-xprofile/classes/class-bp-xprofile-component.php: BP_XProfile_Component::setup_title() |
Sets up the title for pages and |
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/bp-xprofile-settings.php: bp_xprofile_settings_add_feedback_message() |
Adds feedback messages when successfully saving profile field settings. |
bp-notifications/classes/class-bp-notifications-component.php: BP_Notifications_Component::setup_title() |
Set up the title for pages and |
bp-friends/classes/class-bp-friends-component.php: BP_Friends_Component::setup_title() |
Set up the title for pages and |
Changelog #Changelog
Version | Description |
---|---|
1.2.0 | Introduced. |