BP_Document_Component::setup_admin_bar( array $wp_admin_nav = array() )
Set up the component entries in the WordPress Admin Bar.
Description
See also
- BP_Component::setup_nav(): for a description of the $wp_admin_nav parameter array.
Parameters
- $wp_admin_nav
-
(Optional) See BP_Component::setup_admin_bar() for a description.
Default value: array()
Source
File: bp-document/classes/class-bp-document-component.php
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | public function setup_admin_bar( $wp_admin_nav = array () ) { // Menus for logged in user. if ( is_user_logged_in() && bp_is_active( 'media' ) && bp_is_profile_document_support_enabled() ) { // Setup the logged in user variables. $document_link = trailingslashit( bp_loggedin_user_domain() . bp_get_document_slug() ); // Add main Messages menu. $wp_admin_nav [] = array ( 'parent' => buddypress()->my_account_menu_id, 'id' => 'my-account' . $this ->id, 'title' => __( 'Documents' , 'buddyboss' ), 'href' => $document_link , ); // Document. $wp_admin_nav [] = array ( 'parent' => 'my-account' . $this ->id, 'id' => 'my-account-' . $this ->id . '-my-document' , 'title' => __( 'My Documents' , 'buddyboss' ), 'href' => $document_link , 'position' => 10, ); } parent::setup_admin_bar( $wp_admin_nav ); } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.4.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.