Contents
bp_current_component()
Return the name of the current component.
Description
Return
(string) Component name.
Source
File: bp-core/bp-core-template.php
function bp_current_component() { $bp = buddypress(); $current_component = !empty( $bp->current_component ) ? $bp->current_component : false; /** * Filters the name of the current component. * * @since BuddyPress 1.0.0 * * @param string|bool $current_component Current component if available or false. */ return apply_filters( 'bp_current_component', $current_component ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-loader.php: buddypress() |
The main function responsible for returning the one true BuddyBoss Instance to functions everywhere. |
bp-core/bp-core-template.php: bp_current_component |
Filters the name of the current component. |
Used By | Description |
---|---|
bp-document/classes/class-bp-document-theme-compat.php: BP_Document_Theme_Compat::is_document() |
Set up the theme compatibility hooks, if we’re looking at an document page. |
bp-core/compatibility/bp-incompatible-plugins-helper.php: bp_core_fix_forums_subscriptions_tab() |
Fix forums subscription tab in user’s profile. |
bp-core/compatibility/bp-incompatible-plugins-helper.php: bp_core_fix_wpml_redirection() |
Add fix for WPML redirect issue |
bp-xprofile/bp-xprofile-functions.php: bp_xprofile_get_groups() |
Fetch a set of field groups, populated with fields and field data. |
bp-core/deprecated/buddyboss/1.2.9.php: bp_member_type_shortcode_filter() |
Adds a filter on shortcode. |
bp-members/classes/class-bp-members-theme-compat.php: BP_Members_Theme_Compat::single_template_hierarchy() |
Add custom template hierarchy to theme compat for member pages. |
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-registration-theme-compat.php: BP_Registration_Theme_Compat::template_hierarchy() |
Add template hierarchy to theme compat for registration/activation pages. |
bp-members/bp-members-template.php: bp_get_loggedin_user_nav() |
Render the navigation markup for the logged-in user. |
bp-friends/screens/requests.php: friends_screen_requests() |
Catch and process the Requests page. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_filter_options() |
Get the |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_current_object() |
Get the current component or action. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_search_objects() |
Get The list of search objects (primary + secondary). |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_single_item_nav_classes() |
Returns the single item nav container classes |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_container_classes() |
Returns the main BuddyPress container classes. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_directory_type_navs_class() |
Provides default nav wrapper classes. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_directory_list_class() |
Gets the directory nav item list class. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_nav_classes() |
Retrieve a space separated list of classes for the current nav item. |
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/template-tags.php: bp_nouveau_after_loop() |
Template tag to wrap the after component loop |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_pagination() |
Pagination for loops |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_loop_classes() |
Get the component’s loop classes |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_loop_is_grid() |
Checks if the layout preferences is set to grid (2 or more columns). |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_loop_get_grid_columns() |
Returns the number of columns of the layout preferences. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_dir_is_vert_layout() |
Return a bool check for component directory layout. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_before_loop() |
Template tag to wrap the before component loop |
bp-templates/bp-nouveau/includes/ajax.php: bp_nouveau_ajax_object_template_loader() |
Load the template loop for the current object. |
bp-templates/bp-nouveau/includes/functions.php: bp_nouveau_get_component_filters() |
Get Dropdawn filters for the current component of the one passed in params |
bp-templates/bp-nouveau/includes/functions.php: bp_nouveau_wrapper() |
Output HTML content into a wrapper. |
bp-templates/bp-nouveau/buddypress-functions.php: BP_Nouveau::setup_directory_nav() |
Define the directory nav items |
bp-core/deprecated/buddyboss/1.0.php: bp_nouveau_get_group_description_excerpt() |
Filters the excerpt of a group description. |
bp-core/bp-core-template.php: bp_get_title_parts() |
Get the title parts of the BuddyPress displayed page |
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_is_root_component() |
Check to see if a component’s URL should be in the root, not under a member page. |
bp-core/bp-core-template.php: bp_is_component_front_page() |
Check if the specified BuddyPress component directory is set to be the front page. |
bp-core/bp-core-template.php: bp_is_blog_page() |
Is this a blog page, ie a non-BP page? |
bp-core/bp-core-template.php: is_buddypress() |
Is this a BuddyPress component? |
bp-core/bp-core-template.php: bp_is_active() |
Check whether a given component (or feature of a component) is active. |
bp-core/bp-core-template.php: bp_get_root_slug() |
Get the root slug for given component. |
bp-core/bp-core-template.php: bp_get_name_from_root_slug() |
Return the component name based on a root slug. |
bp-core/bp-core-template.php: bp_get_search_input_name() |
Get the ‘name’ attribute for the search form input element. |
bp-core/bp-core-template.php: bp_get_search_default_text() |
Return the default text for the search box for a given component. |
bp-core/bp-core-template.php: bp_get_options_nav() |
Output the “options nav”, the secondary-level single item navigation menu. |
bp-core/classes/class-bp-core-oembed-extension.php: BP_Core_oEmbed_Extension::content_buffer_end() |
End object buffer. |
bp-core/bp-core-buddybar.php: bp_nav_item_has_subnav() |
Check whether a given nav item has subnav items. |
bp-core/bp-core-cssjs.php: bp_core_add_jquery_mask() |
Enqueues jquery.mask.js on BuddyPress pages. |
bp-core/bp-core-functions.php: bp_update_is_directory() |
Set the “is_directory” global. |
bp-core/bp-core-functions.php: bp_update_is_item_admin() |
Set the “is_item_admin” global. |
bp-core/bp-core-functions.php: bp_update_is_item_mod() |
Set the “is_item_mod” global. |
bp-core/bp-core-functions.php: bp_core_get_component_search_query_arg() |
Get the ‘search’ query argument for a given component. |
bp-core/bp-core-functions.php: bp_core_get_directory_page_id() |
Get the page ID corresponding to a component directory. |
bp-core/bp-core-attachments.php: bp_attachments_cover_image_is_edit() |
Are we on a page to edit a cover photo? |
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.