PHP code example of christian / wp_nonce
1. Go to this page and download the library: Download christian/wp_nonce library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
christian / wp_nonce example snippets
//namespace
use Christian\WPNonce\Nonce;
// create nonce object
$nonce = new Nonce();
// getter and setter for attributes
$nonce->set_attributname('attribute_content');
// get nonce url
$nonce->nonce_url();
// get nonce form field
$nonce->nonce_field();
// get nonce create
$nonce->create();
// nonce are you sure message
$nonce->ays();
// verify nonce
$nonce->verify($value);
// check admin referer
$nonce->verify_admin();
// check ajax referer
$nonce->verify_ajax();
// get nonce referer field
$nonce->referer_field();