Download the PHP package pinkcrab/ajax without Composer
On this page you can find all versions of the php package pinkcrab/ajax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pinkcrab/ajax
More information about pinkcrab/ajax
Files in pinkcrab/ajax
Package ajax
Short Description Ajax creation library for the Perique Framework.
License MIT
Homepage https://pinkcrab.co.uk
Informations about the package ajax
Ajax
A simple but powerful Ajax library for the PinkCrab Perique framework. Allows for the creation of object based Ajax calls that handle all basic Nonce validation, WP Actions and makes use of the HTTP PSR Interfaces.
Why?
Writing Ajax scripts for WordPress can get messy really quickly, with the need to define up to 2 actions with a shared callback. The Perique Ajax Module makes use of the registration and dependency injection aspects of the framework. This allows for the injection of services into your callback, allowing for clean and testable code.
Perique Ajax Documentation
- Ajax Model
- Ajax Helper
- Response Factory
- Hooks
- Example
Setup
Requires the PinkCrab Perique Framework v2 and Composer
Install the Module using composer
Include the custom Ajax Module
Usage
Create your Ajax Models
This would have an ajax call with
my_ajax_action
action assigned.
Add all your Ajax Models to registration.php
License
MIT License
http://www.opensource.org/licenses/mit-license.html
Pre-Release
- For Perique 1.4.*, use version 1.1.0
- For Perique 1.3.*, use version 1.0.4
- For Perique 1.0. - 1.2., use version 1.0.3
Change Log
- 2.0.0 - Bump support for Perique 2.0.0, remove Ajax::bootstrap() and replace with the Ajax Module.
- 1.1.0 - Bump support for Perique 1.4.0
- 1.0.4 - Update dev deps to wp6.1 and PinkCrab/HTTP 1.*, Drop Support for PHP 7.1
- 1.0.3 - Update dev deps, update GH Pipeline and improve conditional on checking if doing ajax.
- 1.0.2 - Added in Ajax_Bootstrap class with ::use() method, for simpler inclusion with Perique. Docs improved as part of Perique.info site
- 1.0.1 - Update yoast/phpunit-polyfills requirement from ^0.2.0 to ^0.2.0 || ^1.0.0 by @dependabot in #13
- 1.0.0 - Supports Perique 1.0.0 and includes checks to ensure only added when wp_ajax called
- 0.1.0 Extracted from the Registerables module. Now makes use of a custom Registration_Middleware service for dispatching all Ajax calls.
All versions of ajax with dependencies
pinkcrab/perique-framework-core Version 2.0.*
pinkcrab/http Version 1.0.*
pinkcrab/enqueue Version 1.*
pinkcrab/wp-nonce Version *