Gravity Forms: refactor gform_confirmation filter anonymous callback
-
Hi there!
There’s a Gravity Forms filter on
gform_confirmationthat’s hooked into an anonymous callback, which means that I can’t easily change it withremove_filter. Could you please refactor it to a named callback so that I can remove the filter?Another thought– to be a bit more future-proof, you could add a filter inside the callback to deactivate it, e.g.:
$show_confirmation = apply_filters('show_oopspam_confirmation', true);
if ($show_confirmation === false) {
return $confirmation;
}This way, if the
gform_confirmationhook priority level changes, people who want to override this feature can still do that.
The topic ‘Gravity Forms: refactor gform_confirmation filter anonymous callback’ is closed to new replies.