manifest / unclassified / abilities_api_demo
WPF Galleries
Demonstrates WordPress Abilities API with WP Forms and Envira Gallery integration
★ 0stars
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/laxmariappan/abilities_api_demo/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
WPF Galleries Plugin
A WordPress plugin that demonstrates the Abilities API by integrating WP Forms and Envira Gallery.
Note: This is under development and not ready for production
Features
- WP Forms Integration: Retrieves form submissions with uploaded images
- Envira Gallery Integration: Creates galleries from form submission data
- Abilities API: Uses standardized abilities for plugin interoperability
- Admin Interface: Simple interface to trigger the workflow
Requirements
- WordPress 5.0+
- Abilities API plugin
- WP Forms plugin (for form submissions)
- Envira Gallery plugin (for gallery creation)
Installation
- Upload the plugin files to
/wp-content/plugins/abilities_api_demo/ - Activate the plugin through the 'Plugins' screen in WordPress
- Ensure the Abilities API plugin is installed and activated
Usage
- Go to Tools > WPF Galleries in the WordPress admin
- Enter a WP Forms form ID that contains image upload fields
- Set the number of recent submissions to process
- Enter a title for the new gallery
- Click "Create Gallery"
The plugin will:
- Retrieve form submissions from WP Forms
- Extract uploaded images from the submissions
- Create a new Envira Gallery with those images
- Display the results
Abilities Registered
wpforms/get-form-submissions
- Purpose: Retrieves form submissions from WP Forms
- Input: Form ID and limit
- Output: Array of submissions with field data
- Permission:
manage_options
envira/create-gallery
- Purpose: Creates a new Envira Gallery
- Input: Gallery title, images array, columns
- Output: Gallery ID, URL, and image count
- Permission:
edit_posts
Code Structure
- Main Class:
WPF_Galleries- Singleton pattern with hooks - Abilities Registration: Uses
abilities_api_initaction - Admin Interface: Simple form with AJAX handling
- Interoperability: Demonstrates using multiple abilities together
WordPress Coding Standards
- Follows WordPress PHP coding standards
- Uses proper sanitization and validation
- Implements nonce verification for security
- Uses WordPress hooks and filters
- Proper internationalization with text domain
Resources
License
GPL v2 or later