LLMS_Analytics_Widget::_can_be_processed()
Whether or not the current widget can be processed/displayed.
Return Return
(true|WP_Error) True if the widget can be processed, WP_Error otherwise.
Source Source
File: includes/abstracts/abstract.llms.analytics.widget.php
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' )
);
}
return $can_be_processed;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.3.0 | Introduced. |