LLMS_Admin_Reporting_Tab_Quizzes::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.quizzes.php
public function breadcrumbs() {
$links = array();
// Single quiz.
if ( isset( $_GET['quiz_id'] ) ) {
$quiz = llms_get_post( absint( $_GET['quiz_id'] ) );
$links[ LLMS_Admin_Reporting::get_stab_url( 'overview' ) ] = $quiz->get( 'title' );
}
if ( isset( $_GET['attempt_id'] ) ) {
$attempt = new LLMS_Quiz_Attempt( absint( $_GET['attempt_id'] ) );
$links[ LLMS_Admin_Reporting::get_stab_url( 'attempts' ) ] = $attempt->get_title();
}
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.16.0 | Introduced. |