LLMS_Admin_Reporting::get_stab_url( string $stab )

Get the full URL to a sub-tab within a reporting screen.


Parameters Parameters

$stab

(string) (Required) Slug of the sub-tab.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/admin/reporting/class.llms.admin.reporting.php

	public static function get_stab_url( $stab ) {

		$args = array(
			'page' => 'llms-reporting',
			'tab'  => self::get_current_tab(),
			'stab' => $stab,
		);

		switch ( self::get_current_tab() ) {
			case 'memberships':
				$args['membership_id'] = llms_filter_input( INPUT_GET, 'membership_id', FILTER_SANITIZE_NUMBER_INT );
				break;

			case 'courses':
				$args['course_id'] = llms_filter_input( INPUT_GET, 'course_id', FILTER_SANITIZE_NUMBER_INT );
				break;

			case 'students':
				$args['student_id'] = llms_filter_input( INPUT_GET, 'student_id', FILTER_SANITIZE_NUMBER_INT );
				break;

			case 'quizzes':
				$args['quiz_id'] = llms_filter_input( INPUT_GET, 'quiz_id', FILTER_SANITIZE_NUMBER_INT );
				break;
		}

		return add_query_arg( $args, admin_url( 'admin.php' ) );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.35.0 Sanitize input data.
3.32.0 Added Memberships tab.
3.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.