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.

LLMS_Admin_Reporting::get_tab_cap( string $tab = null )

Get the WP capability required to access a reporting tab.

Description Description

Defaults to ‘view_lifterlms_reports’. Most reports implement additional permissions within the view. Sales & Enrollments tab requires ‘view_others_lifterlms_reports’ b/c they don’t add any additional filters within the view.

Top ↑

Parameters Parameters


(string) (Optional) ID/slug of the tab.

Default value: null

Top ↑

Return Return


Top ↑

Source Source

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

	private function get_tab_cap( $tab = null ) {

		$tab = is_null( $tab ) ? self::get_current_tab() : $tab;

		$cap = 'view_lifterlms_reports';
		if ( in_array( $tab, array( 'sales', 'enrollments' ), true ) ) {
			$cap = 'view_others_lifterlms_reports';


Top ↑

Changelog Changelog

Version Description
3.19.4 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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