2017 © Pedro Peláez
 

library wp-nonce-wrapper

image

nimos/wp-nonce-wrapper

  • Tuesday, April 4, 2017
  • by nimos
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Wordpress Nonce Wrapper

This wrapper provides Wordpress' nonce functionality in an object-oriented environment., (*1)

Installation

To install the package, run composer require nimos/wp-nonce-wrapper.
Alternatively, you can download the zip file from Github, and run composer update to install the dependencies., (*2)

Usage

Create a Nonce:, (*3)

$nonce = WpNonceWrapper::create_nonce();

Generate a nonce URL for 'http://example.com':, (*4)

$url = WpNonceWrapper::nonce_url( 'http://example.com' );

Generate hidden input to use a nonce in a form:, (*5)

WpNonceWrapper::nonce_field();

Verify a Nonce:, (*6)

$valid = WpNonceWrapper::verify_nonce( $nonce );

Display an are you sure dialogue, to manually confirm an action:, (*7)

WpNonceWrapper::nonce_ays( $someAction );

Testing

To run the tests, run vendor\bin\phpunit tests\WrapperTest.php
You will likely have to update WP_DIR in the test file to point to your Wordpress installation., (*8)

The Versions

04/04 2017

dev-master

9999999-dev

  Sources   Download

The Development Requires

04/04 2017

0.1

0.1.0.0

  Sources   Download

The Development Requires