WP Manifestindependent plugin directory
manifest / unclassified / abilities_api_demo

WPF Galleries

Demonstrates WordPress Abilities API with WP Forms and Envira Gallery integration

★ 0stars

Install

Download source zip No release zip yet

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.zip
No 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

  1. Upload the plugin files to /wp-content/plugins/abilities_api_demo/
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Ensure the Abilities API plugin is installed and activated

Usage

  1. Go to Tools > WPF Galleries in the WordPress admin
  2. Enter a WP Forms form ID that contains image upload fields
  3. Set the number of recent submissions to process
  4. Enter a title for the new gallery
  5. Click "Create Gallery"

The plugin will:

  1. Retrieve form submissions from WP Forms
  2. Extract uploaded images from the submissions
  3. Create a new Envira Gallery with those images
  4. 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_init action
  • 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

Official WP repo

License

GPL v2 or later