manuel-rod / wp_nonce_oop
Wordpress Nonce OOP Implementation
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/manuel-rod/wp_nonce_oop
Requires
- php: >=5.6
Requires (Dev)
- brain/monkey: 2.2.0
- phpunit/php-code-coverage: 4.0.x-dev
- phpunit/phpunit: 5.7
This package is not auto-updated.
Last update: 2025-12-12 09:21:43 UTC
README
Wordpress Nonce OOP Implementation. Just an OOP wrap.
Installation
$ composer require manuel-rod/wp_nonce_oop
Usage
$nonce = new WP_Nonce('wp_action_nonce');
Public methods
$nonce->createNonce() $nonce->verifyNonce($nonce) $nonce->nonceField($name = '_wpnonce', $referrer = true, $echo = true) $nonce->nonceUrl($url, $name = '_wpnonce') $nonce->checkAdminReferer($name = '_wpnonce') $nonce->checkAjaxReferer($name = false, $die = true)
Testing (phpunit)
Copy phpunit.xml.dist to phpunit.xml and modify to your needs.
$ cd vendor/manuelRod/WP_Nonce_OOP
$ composer install
$ vendor/bin/phpunit
Licence
MIT