2017 © Pedro Peláez
 

wordpress-plugin wordpress-nonce

This will enable WordPress Nonce function to use on project

image

debabratakarfa/wordpress-nonce

This will enable WordPress Nonce function to use on project

  • Friday, February 24, 2017
  • by debabratakarfa
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

WordPress_Nonce

WordPress plugin that enables the wordpress nonce function in environment., (*1)

How to install using composer

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

How to use

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

How to do Test

Open Terminal [Consider you using VVV and PHPUnit Test properly setup]

vagrant ssh
cd /path/to/your/install/wordpress/plugin_folder/wordpress-nonce/
phpunit

The Versions

24/02 2017

dev-master

9999999-dev

This will enable WordPress Nonce function to use on project

  Sources   Download

GPL

The Requires

  • php >=7.0.0

 

The Development Requires

by Debabrata Karfa