bayodesegun / wordpress-oo-nonces
WordPress Object-Oriented Nonces
Package info
github.com/bayodesegun/wordpress-oo-nonces
Type:wordpress-plugin
pkg:composer/bayodesegun/wordpress-oo-nonces
Requires
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2026-03-07 07:54:51 UTC
README
The Wordpress Objected-Oriented Nonces is a plugin that facilitates the use of Wordpress nonces in a object-oriented fashion, by providing a class with functions that implement the original nonce-related function.
Installation
Production installation (without test files)
composer require bayodesegun/wordpress-oo-nonces "~1.0.0"
Development installation (with test files)
composer require bayodesegun/wordpress-oo-nonces "dev-master"
Usage
-
From any part of WordPress, instantiate a new
WP_OO_Noncesclass:$nonce = new WP_OO_Nonces(); -
Access the usual Nonce functions via the instance variable, dropping the
wp_prefix where present. For example to use thewp_nonce_url()function, do something like:$out = $nonce->nonce_url(admin_url());