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.
Parameters Parameters
- $tab
-
(string) (Optional) ID/slug of the tab.
Default value: null
Return Return
(string)
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'; } /**
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.19.4 | Introduced. |