dev-master
9999999-dev
The Development Requires
by Emili Castells
1.0.1
1.0.1.0
The Development Requires
by Emili Castells
1.0.0
1.0.0.0
The Development Requires
by Emili Castells
Wallogit.com
2017 © Pedro Peláez
A simple to use implementation of WordPress Nonces., (*1)
Install with Composer:, (*2)
$ composer require dinamiko/nonces
Create a nonce:, (*3)
$nonce = new Dinamiko\Nonces\Nonce( 'my-action' ); $nonce_value = (string) $nonce;
Create a nonce field:, (*4)
$nonce = new Dinamiko\Nonces\Nonce( 'my-action' ); $field = $nonce->create_field();
Create a nonce URL:, (*5)
$nonce = new Dinamiko\Nonces\Nonce( 'my-action' ); $url = $nonce->create_url( 'http://example.com' );
Verify a nonce:, (*6)
$nonce = new Dinamiko\Nonces\Nonce( 'my-action' ); $is_valid = $nonce->is_valid( $_POST['foo'] );
$ cd vendor/dinamiko/nonces $ composer install $ vendor/bin/phpunit