bp_core_add_contextual_help( string $screen = '' )
Adds contextual help to BuddyPress admin pages.
Description
Parameters
- $screen
-
(Optional) Current screen.
Default value: ''
Source
File: bp-core/admin/bp-core-admin-functions.php
function bp_core_add_contextual_help( $screen = '' ) { $screen = get_current_screen(); switch ( $screen->id ) { // Component page. case 'settings_page_bp-components' : // Help tabs. $screen->add_help_tab( array( 'id' => 'bp-comp-overview', 'title' => __( 'Overview', 'buddyboss' ), 'content' => bp_core_add_contextual_help_content( 'bp-comp-overview' ), ) ); // Help panel - sidebar links. $screen->set_help_sidebar( '<p><strong>' . __( 'For more information:', 'buddyboss' ) . '</strong></p>' . '<p>' . __( '<a href="https://www.buddyboss.com/resources/">Documentation</a>', 'buddyboss' ) . '</p>' ); break; // Pages page. case 'settings_page_bp-page-settings' : // Help tabs. $screen->add_help_tab( array( 'id' => 'bp-page-overview', 'title' => __( 'Overview', 'buddyboss' ), 'content' => bp_core_add_contextual_help_content( 'bp-page-overview' ), ) ); // Help panel - sidebar links. $screen->set_help_sidebar( '<p><strong>' . __( 'For more information:', 'buddyboss' ) . '</strong></p>' . '<p>' . __( '<a href="https://www.buddyboss.com/resources/">Documentation</a>', 'buddyboss' ) . '</p>' ); break; // Settings page. case 'settings_page_bp-settings' : // Help tabs. $screen->add_help_tab( array( 'id' => 'bp-settings-overview', 'title' => __( 'Overview', 'buddyboss' ), 'content' => bp_core_add_contextual_help_content( 'bp-settings-overview' ), ) ); // Help panel - sidebar links. $screen->set_help_sidebar( '<p><strong>' . __( 'For more information:', 'buddyboss' ) . '</strong></p>' . '<p>' . __( '<a href="https://www.buddyboss.com/resources/">Documentation</a>', 'buddyboss' ) . '</p>' ); break; // Profile fields page. case 'users_page_bp-profile-setup' : // Help tabs. $screen->add_help_tab( array( 'id' => 'bp-profile-overview', 'title' => __( 'Overview', 'buddyboss' ), 'content' => bp_core_add_contextual_help_content( 'bp-profile-overview' ), ) ); // Help panel - sidebar links. $screen->set_help_sidebar( '<p><strong>' . __( 'For more information:', 'buddyboss' ) . '</strong></p>' . '<p>' . __( '<a href="https://www.buddyboss.com/resources/">Documentation</a>', 'buddyboss' ) . '</p>' ); break; } }
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.