Akismet::submit_spam()

Description #

Submit spam to akismet.

Source #

File: addons/akismet/akismet.php

	public function submit_spam() {

		// Check role.
		if ( ! current_user_can( 'manage_options' ) || ! wp_verify_nonce( ap_sanitize_unslash( 'nonce', 'r' ), 'send_spam' ) ) {
			die( esc_attr__( 'Cheating', 'anspress-question-answer' ) );
		}

		$post_id = ap_sanitize_unslash( 'post_id', 'r' );
		$this->api_request( $post_id, true );

		// Redirect.
		wp_redirect( admin_url( 'edit.php?post_type=question' ) );
		die();
	}

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Add your comment