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.zipReadme
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.phpfor example functions to filter various utility methods from theAdvanced_Posts_Widget_Utilsclass. - Check out
field-subtitle.phpfor an example in adding an additional field to the widget form.
A Quick Overview
- Add to the widget
$instancevia theapw_instance_defaultsfilter. - Add the field to the widget form via the
"apw_form_before_field_{$name}"filter or the"apw_form_after_field_{$name}"filter. - Hook into the
Widget_APW_Recent_Posts::update()method to save the field value. - Hook into the
Widget_APW_Recent_Posts::widget()method to display the field value.
Resources
- APW plugin on GitHub: https://github.com/dboutote/advanced-posts-widget
- APW plugin overview: http://darrinb.com/advanced-posts-widget/