bp_core_admin_help_main_menu( $main_directories, $docs_path )
Render the BuddyBoss Help page.
Description
Source
File: bp-core/admin/bp-core-admin-help.php
function bp_core_admin_help_main_menu( $main_directories, $docs_path ) { foreach ( $main_directories as $sub_directories ) { $dir_pos = false !== strpos( $sub_directories, 'miscellaneous' ) ? true : false; if ( ! empty( $dir_pos ) ) { continue; } $index_file = glob( $sub_directories . "/0-*.md" ); $directories = array_diff( glob( $sub_directories . "/*" ), $index_file ); // converting array into string. $index_file = current( $index_file ); ?> <div class="bp-help-card bp-help-menu-wrap"> <div class="inside"> <?php $url = add_query_arg( 'article', str_replace( $docs_path, "", $index_file ) ); // print the title of the section printf( '<h2><a href="%s">%s</a></h2>', $url, bp_core_admin_help_get_file_title( $index_file ) ); // print the article content $content = bp_core_admin_help_display_content( $index_file ); $content_array = explode( '<p>', $content ); if ( ! empty( $content_array[1] ) ) { echo $content_array[1]; } else { $content = bp_core_stripe_header_tags( $content ); echo wp_trim_words( $content, 30, NULL ); } ?> </div> </div> <?php } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.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.