dev-master
9999999-devA simple OOP Class for using nonces in WordPress
MIT
The Development Requires
by Christoph Wolff
0.0.1
0.0.1.0A simple OOP Class for using nonces in WordPress
MIT
The Development Requires
by Christoph Wolff
A simple OOP Class for using nonces in WordPress
Some class to use WP nonces in a OOP kind of way, (*1)
composer require christophwolff/wpnonce
Or just add, (*2)
"christophwolff/wpnonce": "0.0.1"
to your compsoer.json
file and run a compposer update, (*3)
$myNonce = new WPnonce( 'myAction' ); $freshNonce = $myNonce->createNonce();
$myNonce = new WPnonce( 'myAction' ); $result = $myNonce->verifyNonce( '34653456f' );
$myNonce = new WPnonce( 'myAction' ); $htmlField = $myNonce->createNonceField( '_wpnonce', true );
$name = '_wpnonce'; $actionUrl = 'http://my.wrdprss.com/foo/bar'; $myNonce = new WPnonce( 'myAction' ); $actionUrlNonce = $myNonce->createNonceUrl( $actionUrl, $name, true );
$myNonce = new WPnonce( 'myAction' ); $result = $myNonce->checkAdminReferer( $query_arg );
$query_arg = '_wpnonce_name'; $myNonce = new WPnonce( 'myAction' ); $result = myNonce->checkAjaxReferer( $query_arg, true );
A simple OOP Class for using nonces in WordPress
MIT
A simple OOP Class for using nonces in WordPress
MIT