This is an oop version WP Nonce from Inpsyde.
Copy this below code snipped to your composer.json file and run "composer update" this package load in your vendor directory.
"repositories": [
{
"url": "https://github.com/fazleelahhee/wpnonce.git",
"type": "git"
}
],
"require": {
"fazleelahhee/inpsyde": "@dev"
}
Create nonce field:
$wpnonce = new \Fazleelahhee\Inpsyde\WPNonce();
$nonceField = $wpnonce->getField('wp_nonce_test_sction', 'wp_nonce_test_name', true, false);
Create nonce url:
$wpnonce = new \Fazleelahhee\Inpsyde\WPNonce();
$nonceUrl = $wpnonce->getUrl('http://< domain name >/');
Verify nonce
$wpnonce = new \Fazleelahhee\Inpsyde\WPNonce();
$wpnonce->verify($nonce);
- Fazle Elahee
This project is licensed under the MIT License - see the LICENSE.md file for details