dozent_checking_nonce( string $method = 'post' )


Parameters

$method

(string) (Optional) CSRF protected by wp nonce verify

Default value: 'post'


Source

File: includes/form-functions.php

    function dozent_checking_nonce($method = 'post'){
        if ($method === 'post') {
            if (!isset($_POST[DOZENT_NONCE]) || ! wp_verify_nonce($_POST[DOZENT_NONCE], DOZENT_NONCE_ACTION)) {
                exit('Nonce does not matched, Try refreshing the page or clear cache');
            }
        } else {
            if (!isset($_GET[DOZENT_NONCE]) || !wp_verify_nonce($_GET[DOZENT_NONCE], DOZENT_NONCE_ACTION)) {
                exit('Nonce does not matched, Try refreshing the page or clear cache');
            }
        }
    }