2017 © Pedro Peláez
 

library nonces

image

dinamiko/nonces

  • Saturday, April 8, 2017
  • by dinamiko
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

DK Nonces

Introduction

A simple to use implementation of WordPress Nonces., (*1)

Table of Contents

Installation

Install with Composer:, (*2)

$ composer require dinamiko/nonces

Usage

Create a nonce:, (*3)

$nonce = new Dinamiko\Nonces\Nonce( 'my-action' );
$nonce_value = (string) $nonce;

Create a nonce field:, (*4)

$nonce = new Dinamiko\Nonces\Nonce( 'my-action' );
$field = $nonce->create_field();

Create a nonce URL:, (*5)

$nonce = new Dinamiko\Nonces\Nonce( 'my-action' );
$url = $nonce->create_url( 'http://example.com' );

Verify a nonce:, (*6)

$nonce = new Dinamiko\Nonces\Nonce( 'my-action' );
$is_valid = $nonce->is_valid( $_POST['foo'] );

Run the tests

$ cd vendor/dinamiko/nonces
$ composer install
$ vendor/bin/phpunit

The Versions

08/04 2017

dev-master

9999999-dev

  Sources   Download

The Development Requires

by Emili Castells

08/04 2017

1.0.1

1.0.1.0

  Sources   Download

The Development Requires

by Emili Castells

08/04 2017

1.0.0

1.0.0.0

  Sources   Download

The Development Requires

by Emili Castells