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.


Top ↑

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;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
7.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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