dev-master
9999999-devThis will enable WordPress Nonce function to use on project
GPL
The Requires
- php >=7.0.0
The Development Requires
by Debabrata Karfa
Wallogit.com
2017 © Pedro Peláez
This will enable WordPress Nonce function to use on project
WordPress plugin that enables the wordpress nonce function in environment., (*1)
The composer.json file:, (*2)
"debabratakarfa/wordpress-nonce": "1.0.*"
{
"repositories": [
{
"type": "vcs",
"url" : "https://github.com/debabratakarfa/wordpress-nonce"
}
],
"require": {
"debabratakarfa/wordpress-nonce" : "1.0.*"
}
}
Add to your composer.json file this package as a require an then run 'composer install', (*3)
Or, (*4)
Open Terminal cd /path/to/your/install/wordpress/plugin_folder/ git clone https://github.com/debabratakarfa/wordpress-nonce.git cd wordpress-nonce composer install Then go to Wp-Admin access to activate it
Create nonce, (*5)
$Nonce = new Nonce();
$nonce = $Nonce->create_nonce('my-nonce');
Verify nonce, (*6)
$Nonce = new Nonce();
//Create New nonce
$nonce = $Nonce->create_nonce('my-nonce');
if ($nonce->verify_nonce($nonce, 'my-nonce')) {
//If true, then your code
}else{
//If false, then your code
}
Create nonce url, (*7)
$nonce = new Nonce();
$url = $nonce->nonce_url('http://my-url.com', 'doing-something', 'my-nonce');
Open Terminal [Consider you using VVV and PHPUnit Test properly setup] vagrant ssh cd /path/to/your/install/wordpress/plugin_folder/wordpress-nonce/ phpunit
This will enable WordPress Nonce function to use on project
GPL