LLMS_Analytics_Widget::output()


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


Top ↑

User Contributed Notes User Contributed Notes

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