25/01
2016
dev-master
9999999-dev
GPL-3.0+
The Requires
- php >=5.3.2
The Development Requires
by Asvin Balloo
composer require asvinb/wp-nonce-oo
Create nonce, (*1)
$nonce = \Nonce\Wrapper::wp_create_nonce();
Verify nonce, (*2)
$isValid = \Nonce\Wrapper::wp_verify_nonce($nonce);
Create nonce hidden input, (*3)
\Nonce\Wrapper::wp_nonce_field();
Generate nonce URL:, (*4)
$url = \Nonce\Wrapper::wp_nonce_url('http://www.google.com');
Check if request was been referred from an admin screen:, (*5)
$admin = \Nonce\Wrapper::check_admin_referer();
Verifies the AJAX request to prevent processing requests external of the blog., (*6)
$ajax = \Nonce\Wrapper::check_ajax_referer();
vendor/bin/phpunit
Do update the WP_INSTALL constant in phpunit.xml to a local working WordPress installation, (*7)
Initial version, (*8)
GPL-3.0+