Giter VIP home page Giter VIP logo

wordpress-nonce's Introduction

WordPress_Nonce

WordPress plugin that enables the wordpress nonce function in environment.

##How to install using composer

The composer.json file:

"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'

Or

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

$Nonce = new Nonce();
$nonce = $Nonce->create_nonce('my-nonce');

Verify nonce

$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

$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

wordpress-nonce's People

Watchers

James Cloos avatar Debabrata Karfa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.