WP Manifestindependent plugin directory
manifest / developer / advanced-posts-widget-testing

APW Testing

A series of functions to test the Advanced Posts Widget

by Darrin Boutote · github.com/dboutote/advanced-posts-widget-testing · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/dboutote/advanced-posts-widget-testing/archive/refs/heads/master.zip

Readme

Advanced Posts Widget Testing

This is small plugin for testing the Advanced Posts Widget. It's meant as a brief overview, outlining ways to extend the widget.

  • Check out filter-utils.php for example functions to filter various utility methods from the Advanced_Posts_Widget_Utils class.
  • Check out field-subtitle.php for an example in adding an additional field to the widget form.

A Quick Overview

  1. Add to the widget $instance via the apw_instance_defaults filter.
  2. Add the field to the widget form via the "apw_form_before_field_{$name}" filter or the "apw_form_after_field_{$name}" filter.
  3. Hook into the Widget_APW_Recent_Posts::update() method to save the field value.
  4. Hook into the Widget_APW_Recent_Posts::widget() method to display the field value.

Resources

Read the full README on GitHub →