Inpsyde\MultilingualPress\Common\Nonce\WPNonce::is_valid PHP Метод

is_valid() публичный Метод

Checks if the nonce is valid with respect to the current context.
С версии: 3.0.0
public is_valid ( ) : boolean
Результат boolean Whether or not the nonce is valid.
    public function is_valid()
    {
        if (!$this->context) {
            $this->context = new OriginalRequestContext();
        }
        if (!isset($this->context[$this->action])) {
            return false;
        }
        $nonce = $this->context[$this->action];
        if (!is_string($nonce)) {
            return false;
        }
        return (bool) wp_verify_nonce($nonce, $this->get_hash());
    }