LLMS_Admin_Builder::admin_bar_menu( WP_Admin_Bar $wp_admin_bar )
Add menu items to the WP Admin Bar to allow quiz returns to the dashboard from the course builder
Parameters Parameters
- $wp_admin_bar
-
(WP_Admin_Bar) (Required) Instance of WP_Admin_Bar
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.builder.php
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | public static function admin_bar_menu( $wp_admin_bar ) { // Partially lifted from `wp_admin_bar_site_menu()` in wp-includes/admin-bar.php. if ( current_user_can( 'read' ) ) { $wp_admin_bar ->add_menu( array ( 'parent' => 'site-name' , 'id' => 'dashboard' , 'title' => __( 'Dashboard' , 'lifterlms' ), 'href' => admin_url(), ) ); $wp_admin_bar ->add_menu( array ( 'parent' => 'site-name' , 'id' => 'llms-courses' , 'title' => __( 'Courses' , 'lifterlms' ), 'href' => admin_url( 'edit.php?post_type=course' ), ) ); wp_admin_bar_appearance_menu( $wp_admin_bar ); } } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.24.0 | Unknown. |
3.16.7 | Introduced. |