LLMS_Controller_Achievements::maybe_handle_reporting_actions()

Handle achievement form actions to download (for students and admins) and to delete (admins only)


Return Return

(void)


Top ↑

Source Source

File: includes/controllers/class.llms.controller.achievements.php

	public function maybe_handle_reporting_actions() {

		if ( ! isset( $_REQUEST['_llms_achievement_actions_nonce'] ) ) {
			return;
		}
		if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_llms_achievement_actions_nonce'] ) ), 'llms-achievement-actions' ) ) {
			return;
		}

		if ( isset( $_POST['llms_delete_achievement'] ) ) {
			if ( ! current_user_can( 'manage_lifterlms' ) ) {
				return;
			}

			$this->delete( llms_filter_input( INPUT_POST, 'achievement_id', FILTER_SANITIZE_NUMBER_INT ) );
		}
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.35.0 Sanitize $_POST data.
3.18.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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