LLMS_Admin_Reporting_Tab_Courses::breadcrumbs()
Add breadcrumb links to the tab depending on current view
Return Return
(void)
Source Source
File: includes/admin/reporting/tabs/class.llms.admin.reporting.tab.courses.php
41 42 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 71 72 73 74 75 76 77 78 79 80 81 82 83 | public function breadcrumbs() { $links = array (); // Single student. if ( isset( $_GET [ 'course_id' ] ) ) { $course = llms_get_post( absint( $_GET [ 'course_id' ] ) ); $links [ LLMS_Admin_Reporting::get_stab_url( 'overview' ) ] = $course ->get( 'title' ); // phpcs:disable -- commented out code // if ( isset( $_GET['stab'] ) && 'courses' === $_GET['stab'] ) { // $links[ LLMS_Admin_Reporting::get_stab_url( 'courses' ) ] = __( 'All Courses', 'lifterlms' ); // if ( isset( $_GET['course_id'] ) ) { // $url = LLMS_Admin_Reporting::get_current_tab_url( array( // 'stab' => 'courses', // 'course_id' => $_GET['course_id'], // 'course_id' => $_GET['course_id'], // ) ); // $links[ $url ] = get_the_title( $_GET['course_id'] ); // if ( isset( $_GET['quiz_id'] ) ) { // $url = LLMS_Admin_Reporting::get_current_tab_url( array( // 'stab' => 'courses', // 'course_id' => $_GET['course_id'], // 'course_id' => $_GET['course_id'], // 'quiz_id' => $_GET['quiz_id'], // ) ); // $links[ $url ] = get_the_title( $_GET['quiz_id'] ); // } // } // } // phpcs:enable } foreach ( $links as $url => $title ) { echo '<a href="' . esc_url( $url ) . '">' . $title . '</a>' ; } } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.2.0 | Introduced. |