Skip to content

stepanov/wp-nonces-oop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OOP WP Nonces Generator

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'
]);

About

OOP implementation of WP nonces [TEST]

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages