stepanov / wp-nonces-oop
OOP implementation of WP Nonces
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/stepanov/wp-nonces-oop
Requires (Dev)
This package is auto-updated.
Last update: 2025-10-14 21:14:06 UTC
README
About
Generates WP nonces in OOP manner
Installation
Composer
Install generator globally:
composer global require "stepanov/wp-nonces-oop=*"
To add to your project:
{
"require": {
"stepanov/wp-nonces-oop": "1.*"
}
}
Usage
$nonce = new WpNonces();
$urlNonce = $nonce->createNonceUrl([
'url' => 'http://example.com',
'action' => 'some_action'
]);
$plainNonce = $nonce->createNoncePlain([
'action' => 'some_action'
])
$fieldNonce = $nonce->createNonceField([
'action' => 'some_action'
]);