WP Manifestindependent plugin directory
manifest / developer / jp-toolkit-request-helper

JP Toolkit Request Helper for WordPress

JP Toolkit Request Helper for WordPress contains a set of methods to facilitate handling form requests.

★ 1stars
4release downloads
v1.0.0latest · 6 years ago

Install

Download jp-toolkit-request-helper.zip From the v1.0.0 release on GitHub, Apr 20, 2020

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/jprieton/jp-toolkit-request-helper/releases/download/v1.0.0/jp-toolkit-request-helper.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

This helper serves two purposes:

  1. It pre-processes global input data for security.
  2. It provides some helper methods for fetching input data and pre-processing it.


Accessing form data

Using POST, GET, COOKIE, or SERVER Data

This helper let to you fetch POST, GET, COOKIE or SERVER items. The main advantage of using the provided methods rather than fetching an item directly $_POST['something'] is that the methods will check to see if the item is set and return NULL if not. This lets you conveniently use data without having to test whether an item exists first. In other words, normally you might do something like this:

$something = isset($_POST['something']) ? $_POST['something'] : 'default value';

With this helper methods you can simply do this:

$something = Request::post('something', 'default value');

Please read our Wiki for more detailed information, advanced usage and shorthands.


Autoloading

You'll need to use an autoloader with this. Ideally, this would be Composer.

Composer

From the command line:

composer require jp-toolkit/request-helper


Bug tracker?

Have a bug? Please create an issue on GitHub at https://github.com/jprieton/jp-toolkit-request-helper/issues)

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.0.0 latest
Apr 20, 2020 6 years ago
jp-toolkit-request-helper.zip
4