Skip to content
Snippets Groups Projects
Select Git revision
  • 87f91d1766ca55d814b3f479a9d697f1f0953ad1
  • master default protected
  • devel
  • feature/add-escaping-to-templates
  • feature/add-priority-sorting
  • 3.3.0
  • 3.2.1
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.4.12
  • 2.4.11
  • 2.4.10
  • 2.4.9
  • 2.4.8
  • 2.4.7
  • 2.4.6
  • 2.4.5
  • 2.4.4
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3.2
  • 2.3.1
  • 2.3
25 results

NonceValidator.php

Blame
  • NonceValidator.php 424 B
    <?php
    
    namespace WPDesk\Forms\Validator;
    
    use WPDesk\Forms\Validator;
    
    class NonceValidator implements Validator {
    
    	/** @var string */
    	private $action;
    
    	/** @param string $action */
    	public function __construct( $action ) {
    		$this->action = $action;
    	}
    
    	public function is_valid( $value ): bool {
    		return (bool) wp_verify_nonce( $value, $this->action );
    	}
    
    	public function get_messages(): array {
    		return [];
    	}
    
    }