4.2.5
Patch: template preview + Create Comment surface + default actions
Three fixes / one-line connections that were missing in 4.2.4.
Template preview iframe now actually loads. The
wp_ajax_cf_template_previewaction was being registered on the Admin class constructor, which is gated behind! DOING_AJAX— so the AJAX handler was never wired during AJAX requests. WP’s admin-ajax fell through to its default “0” output and the iframe showed a blank page. Registered the handler in the AJAX branch separately with a lazy-constructed instance.Create Comment action now appears in the Actions tab picker. The action class registered fine via
cf_available_form_actions, but the WordPress category intab-actions.phpdidn’t listcreate_commentin its types array — so the grouped grid skipped it. Now slotted in next tocreate_user/create_postwith anadmin-commentsdashicon.Every starter template lands with a default Email action wired. Previously a brand-new form had no actions at all — submissions saved to the inbox but never emailed anyone.
process_create_form()now appends a default “Email the admin” action when the template doesn’t ship its own. Templates that DO ship actions (product_review → Create Comment, payment templates → providers) keep their wiring untouched.Product review + Lightweight comment templates ship with Create Comment pre-wired. Field mappings — NAME → comment author, EMAIL → author email, REVIEW/COMMENT → content, RATING → rating meta — plus a default Email notification. Open the form, pick a target post on the action, save — done.
Full Changelog: