LLMS_Analytics_Widget::output()
Contents
Source Source
File: includes/abstracts/abstract.llms.analytics.widget.php
/**
* Whether or not the current widget can be processed/displayed.
*
* @since 7.3.0
*
* @return true|WP_Error True if the widget can be processed, `WP_Error` otherwise.
*/
protected function _can_be_processed() { // phpcs:ignore -- PSR2.Methods.MethodDeclaration.Underscore.
$can_be_processed = true;
if ( ! current_user_can( 'view_others_lifterlms_reports' ) ) {
$can_be_processed = new WP_Error(
WP_Http::FORBIDDEN, // 403.
esc_html__( 'You are not authorized to access the requested widget', 'lifterlms' )
);
}
Expand full source code Collapse full source code View on GitHub