WP_Async_Task::handle_postback()

Description #

Verify the postback is valid, then fire any scheduled events.

Source #

File: lib/class-wp-async-task.php

		public function handle_postback() {
			$nonce = ap_sanitize_unslash( '_nonce', 'r' );

			if ( ! empty( $nonce ) && false !== $this->verify_async_nonce( $nonce ) ) {
				if ( ! is_user_logged_in() ) {
					$this->action = "nopriv_$this->action";
				}
				$this->run_action();
			}

			add_filter(
				'wp_die_handler',
				function() {
					die();
				}
			);
			wp_die();
		}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment