Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.


Retrieve the form location for the current screen

Description Description

Must be on a checkout screen, the "edit account" tab of the dashboard, or be viewing as a visitor on the main dashboard page with open registration enabled.

Top ↑

Return Return

(string|boolean) Returns the location id as a string or false if not on a form location screen.

Top ↑

Source Source

File: includes/forms/class-llms-forms-admin-bar.php

	private function get_current_location() {

		if ( is_llms_checkout() ) {

			return 'checkout';

		} elseif ( is_llms_account_page() ) {

			$tab = LLMS_Student_Dashboard::get_current_tab( 'tab' );

			if ( 'edit-account' === $tab ) {
				return 'account';

			if ( 'dashboard' === $tab && 'visitor' === llms_filter_input( INPUT_GET, 'llms-view-as' ) && llms_parse_bool( llms_get_open_registration_status() ) ) {
				return 'registration';


		return false;


Top ↑

Changelog Changelog

Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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