Contents
bp_is_current_action( string $action = '' )
Check to see whether the current page matches a given action.
Description
Along with bp_is_current_component() and bp_is_action_variable(), this function is mostly used to help determine when to use a given screen function.
In BP parlance, the current_action is the URL chunk that comes directly after the current item slug. E.g., in http://example.com/groups/my-group/members the current_action is ‘members’.
Parameters
- $action
-
(string) (Optional) The action being tested against.
Default value: ''
Return
(bool) True if the current action matches $action.
Source
File: bp-core/bp-core-template.php
function bp_is_current_action( $action = '' ) { return (bool) ( $action === bp_current_action() ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-core/bp-core-template.php: bp_current_action() |
Return the name of the current action. |
Used By | Description |
---|---|
bp-core/bp-core-template.php: bp_is_user_groups_invites() |
Is the current page part of a user’s Groups invite page? |
bp-groups/bp-groups-template.php: bp_get_group_current_invite_tab() |
Returns the current group invite tab slug. |
bp-core/bp-core-template.php: bp_is_group_messages() |
Is the current page a group’s message page? |
bp-core/bp-core-template.php: bp_is_group_folders() |
Is the current page a group’s folder page? |
bp-core/bp-core-template.php: bp_is_user_folders() |
Is the current page a user’s folder page? |
bp-core/bp-core-template.php: bp_is_group_document() |
Is the current page a group’s document page? |
bp-settings/actions/capabilities.php: bp_settings_action_capabilities() |
Handles the setting of user capabilities, spamming, hamming, role, etc. |
bp-settings/actions/delete-account.php: bp_settings_action_delete_account() |
Handles the deleting of a user. |
bp-settings/classes/class-bp-settings-component.php: BP_Settings_Component::late_includes() |
Late includes method. |
bp-settings/actions/general.php: bp_settings_action_general() |
Handles the changing and saving of user email addresses and passwords. |
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::user_profile_url() |
Override Forums profile URL with BuddyBoss profile URL |
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/groups.php: BBP_Forums_Group_Extension::setup_filters() |
Setup the group forums class filters |
bp-notifications/screens/read.php: bp_notifications_action_mark_unread() |
Handle marking single notifications as unread. |
bp-notifications/screens/unread.php: bp_notifications_action_mark_read() |
Handle marking single notifications as read. |
bp-notifications/actions/bulk-manage.php: bp_notifications_action_bulk_manage() |
Handles bulk management (mark as read/unread, delete) of notifications. |
bp-notifications/actions/delete.php: bp_notifications_action_delete() |
Handle deleting single notifications. |
bp-notifications/classes/class-bp-notifications-component.php: BP_Notifications_Component::late_includes() |
Late includes method. |
bp-notifications/bp-notifications-template.php: bp_notifications_bulk_management_dropdown() |
Output the dropdown for bulk management of notifications. |
bp-notifications/bp-notifications-template.php: bp_get_the_notification_delete_url() |
Return the URL used for deleting a single notification. |
bp-notifications/bp-notifications-template.php: bp_get_the_notification_mark_link() |
Return the mark link for the current notification. |
bp-notifications/bp-notifications-template.php: bp_has_notifications() |
Initialize the notifications loop. |
bp-blogs/bp-blogs-template.php: bp_blogs_blog_tabs() |
Output navigation tabs for a user Blogs page. |
bp-blogs/screens/create.php: bp_blogs_screen_create_a_blog() |
Load the “Create a Blog” screen. |
bp-blogs/classes/class-bp-blogs-component.php: BP_Blogs_Component::late_includes() |
Late includes method. |
bp-messages/bp-messages-cssjs.php: messages_add_autocomplete_js() |
Enqueue the JS for messages autocomplete. |
bp-messages/bp-messages-cssjs.php: messages_add_autocomplete_css() |
Enqueue the CSS for messages autocomplete. |
bp-messages/actions/notices.php: bp_messages_action_edit_notice() |
Handle editing of sitewide notices. |
bp-messages/actions/star.php: bp_messages_star_action_handler() |
Action handler to set a message’s star status for those not using JS. |
bp-messages/actions/unread.php: bp_messages_action_mark_unread() |
Handle marking a single message thread as unread. |
bp-messages/screens/view.php: messages_screen_conversation() |
Load an individual conversation screen. |
bp-messages/classes/class-bp-messages-box-template.php: BP_Messages_Box_Template::the_message_thread() |
Set up the current thread inside the loop. |
bp-messages/actions/bulk-manage.php: bp_messages_action_bulk_manage() |
Handle bulk management (mark as read/unread, delete) of message threads. |
bp-messages/actions/compose.php: bp_messages_action_create_message() |
Handle creating of private messages or sitewide notices |
bp-messages/actions/delete.php: messages_action_delete_message() |
Process a request to delete a message. |
bp-messages/actions/read.php: bp_messages_action_mark_read() |
Handle marking a single message thread as read. |
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::late_includes() |
Late includes method. |
bp-messages/bp-messages-template.php: bp_get_thread() |
Initialize the messages template loop for a specific thread and sets thread. |
bp-messages/bp-messages-template.php: bp_messages_options() |
Output the markup for the message type dropdown. |
bp-groups/screens/single/members.php: groups_screen_group_members() |
Handle the display of a group’s Members page. |
bp-groups/actions/access.php: bp_groups_group_access_protection() |
Protect access to single groups. |
bp-groups/actions/create.php: groups_action_sort_creation_steps() |
Sort the group creation steps. |
bp-groups/actions/feed.php: groups_action_group_feed() |
Load the activity feed for the current group. |
bp-groups/actions/join.php: groups_action_join_group() |
Catch and process “Join Group” button clicks. |
bp-groups/screens/single/activity-permalink.php: groups_screen_group_activity_permalink() |
Handle the display of a single group activity item. |
bp-groups/screens/single/admin.php: groups_screen_group_admin() |
Handle the display of a group’s Admin pages. |
bp-groups/actions/create.php: groups_action_create_group() |
Catch and process group creation form submissions. |
bp-groups/actions/leave-group.php: groups_action_leave_group() |
Catch and process “Leave Group” button clicks. |
bp-groups/classes/class-bp-group-extension.php: BP_Group_Extension::setup_display_hooks() |
Hook this extension’s group tab into BuddyPress, if necessary. |
bp-groups/classes/class-bp-group-extension.php: BP_Group_Extension::setup_edit_hooks() |
Hook this extension’s Edit panel into BuddyPress, if necessary. |
bp-groups/classes/class-bp-groups-theme-compat.php: BP_Groups_Theme_Compat::is_group() |
Are we looking at something that needs group theme compatibility? |
bp-groups/classes/class-bp-groups-component.php: BP_Groups_Component::late_includes() |
Late includes method. |
bp-groups/classes/class-bp-groups-component.php: BP_Groups_Component::setup_globals() |
Set up component global data. |
bp-groups/classes/class-bp-groups-component.php: BP_Groups_Component::setup_canonical_stack() |
Set up canonical stack for this component. |
bp-groups/bp-groups-template.php: bp_get_group_invite_user_remove_invite_url() |
Get cancel invite url for displayed member group invite in loop. |
bp-groups/bp-groups-template.php: bp_get_group_current_admin_tab() |
Returns the current group admin tab slug. |
bp-groups/bp-groups-template.php: bp_get_group_current_members_tab() |
Returns the current group members tab slug. |
bp-groups/bp-groups-template.php: bp_is_group_creation_step() |
Check which step is displayed during the group creation process. |
bp-groups/bp-groups-template.php: bp_group_is_activity_permalink() |
Determine whether the current page is a group activity permalink. |
bp-groups/bp-groups-template.php: bp_has_groups() |
Start the Groups Template Loop. |
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/classes/class-bp-invites-component.php: BP_Invites_Component::late_includes() |
Late includes method. |
bp-invites/actions/invites.php: bp_member_invite_submit() |
Member submit email invite. |
bp-friends/actions/add-friend.php: friends_action_add_friend() |
Catch and process connection requests. |
bp-friends/actions/remove-friend.php: friends_action_remove_friend() |
Catch and process Remove Connection requests. |
bp-integrations/learndash/buddypress/Reports.php: Reports::registerReportsScript() |
Add scripts when it’s on the reports page |
bp-templates/bp-nouveau/includes/functions.php: bp_nouveau_get_user_feedback() |
All user feedback messages are available here |
bp-templates/bp-nouveau/includes/notifications/template-tags.php: bp_nouveau_notifications_bulk_management_dropdown() |
Output the dropdown for bulk management of notifications. |
bp-templates/bp-nouveau/includes/search/loader.php: BP_Nouveau_Search::setup_actions() |
Register do_action() hooks |
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/deprecated/buddyboss/1.0.php: bp_is_messages_sentbox() |
Is the current page a user’s Messages Sentbox? |
bp-core/bp-core-template.php: bp_get_nav_menu_items() |
Get the items registered in the primary and secondary BuddyPress navigation menus. |
bp-core/bp-core-template.php: bp_is_group_media() |
Is the current page a group’s activity page? |
bp-core/bp-core-template.php: bp_is_group_albums() |
Is the current page a group’s activity page? |
bp-core/bp-core-template.php: bp_is_messages_inbox() |
Is the current page a user’s Messages Inbox? |
bp-core/bp-core-template.php: bp_is_messages_compose_screen() |
Is the current page a user’s Messages Compose screen?? |
bp-core/bp-core-template.php: bp_is_notices() |
Is the current page the Notices screen? |
bp-core/bp-core-template.php: bp_is_messages_conversation() |
Is the current page a single Messages conversation thread? |
bp-core/bp-core-template.php: bp_is_create_blog() |
Is the current page the Create a Blog page? |
bp-core/bp-core-template.php: bp_is_group_subgroups() |
Is the current page a group’s subgroups page? |
bp-core/bp-core-template.php: bp_is_group_forum_topic() |
Is the current page a group forum topic? |
bp-core/bp-core-template.php: bp_is_group_forum_topic_edit() |
Is the current page a group forum topic edit page? |
bp-core/bp-core-template.php: bp_is_group_members() |
Is the current page a group’s Members page? |
bp-core/bp-core-template.php: bp_is_group_invites() |
Is the current page a group’s Invites page? |
bp-core/bp-core-template.php: bp_is_group_membership_request() |
Is the current page a group’s Request Membership page? |
bp-core/bp-core-template.php: bp_is_group_leave() |
Is the current page a leave group attempt? |
bp-core/bp-core-template.php: bp_is_group_create() |
Is the current page part of the group creation process? |
bp-core/bp-core-template.php: bp_is_group_admin_page() |
Is the current page part of a single group’s admin screens? |
bp-core/bp-core-template.php: bp_is_group_activity() |
Is the current page a group’s activity page? |
bp-core/bp-core-template.php: bp_is_user_invites_send_invites() |
Is this a user’s send invites? |
bp-core/bp-core-template.php: bp_is_groups_directory() |
Is the current page the groups directory? |
bp-core/bp-core-template.php: bp_is_group_home() |
Is the current page a single group’s home page? |
bp-core/bp-core-template.php: bp_is_user_friend_requests() |
Is the current page a user’s Connection Requests page? |
bp-core/bp-core-template.php: bp_is_user_mutual_friends() |
Is the current page a user’s Mutual Connections page? |
bp-core/bp-core-template.php: bp_is_user_settings_general() |
Is this a user’s General Settings page? |
bp-core/bp-core-template.php: bp_is_user_settings_notifications() |
Is this a user’s Notification Settings page? |
bp-core/bp-core-template.php: bp_is_user_settings_account_delete() |
Is this a user’s Account Deletion page? |
bp-core/bp-core-template.php: bp_is_user_settings_profile() |
Is this a user’s profile settings? |
bp-core/bp-core-template.php: bp_is_user_friends_activity() |
Is the current page a user’s Connections activity feed? |
bp-core/bp-core-template.php: bp_is_user_groups_activity() |
Is the current page a user’s Groups activity feed? |
bp-core/bp-core-template.php: bp_is_user_profile_edit() |
Is the current page part of a user’s profile editing section? |
bp-core/bp-core-template.php: bp_is_user_change_avatar() |
Is the current page part of a user’s profile avatar editing section? |
bp-core/bp-core-template.php: bp_is_user_change_cover_image() |
Is the current page the a user’s change cover photo profile page? |
bp-core/bp-core-template.php: bp_is_user_recent_posts() |
Is the current page a user’s Recent Blog Posts page? |
bp-core/bp-core-template.php: bp_is_user_recent_commments() |
Is the current page a user’s Recent Blog Comments page? |
bp-core/bp-core-buddybar.php: bp_core_register_nav_screen_function() |
Register a screen function for an item in the main nav array. |
bp-core/bp-core-buddybar.php: bp_core_new_nav_default() |
Modify the default subnav item that loads when a top level nav item is clicked. |
bp-core/bp-core-buddybar.php: bp_core_register_subnav_screen_function() |
Register a screen function, whether or not a related subnav link exists. |
bp-activity/bp-activity-functions.php: bp_activity_get_current_context() |
Gets the current activity context. |
bp-activity/screens/permalink.php: bp_activity_action_permalink_router() |
Catch and route requests for single activity item permalinks. |
bp-activity/actions/delete.php: bp_activity_action_delete_activity() |
Delete specific activity item and redirect to previous page. |
bp-activity/actions/favorite.php: bp_activity_action_mark_favorite() |
Mark activity as liked. |
bp-activity/actions/feeds.php: bp_activity_action_sitewide_feed() |
Load the sitewide activity feed. |
bp-activity/actions/feeds.php: bp_activity_action_personal_feed() |
Load a user’s personal activity feed. |
bp-activity/actions/feeds.php: bp_activity_action_friends_feed() |
Load a user’s friends’ activity feed. |
bp-activity/actions/feeds.php: bp_activity_action_my_groups_feed() |
Load the activity feed for a user’s groups. |
bp-activity/actions/feeds.php: bp_activity_action_mentions_feed() |
Load a user’s @mentions feed. |
bp-activity/actions/feeds.php: bp_activity_action_favorites_feed() |
Load a user’s favorites feed. |
bp-activity/actions/reply.php: bp_activity_action_post_comment() |
Post new activity comment. |
bp-activity/actions/spam.php: bp_activity_action_spam_activity() |
Mark specific activity item as spam and redirect to previous page. |
bp-activity/actions/unfavorite.php: bp_activity_action_remove_favorite() |
Remove activity from likes. |
bp-activity/classes/class-bp-activity-component.php: BP_Activity_Component::late_includes() |
Late includes method. |
bp-activity/actions/post.php: bp_activity_action_post_update() |
Post user/group activity update. |
bp-activity/bp-activity-template.php: bp_get_member_activity_feed_link() |
Return the member activity feed link. |
bp-activity/bp-activity-template.php: bp_has_activities() |
Initialize the activity loop. |
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.