When performing tasks using the Gravity Forms API, handling notifications and hook execution on demand is something that becomes really handy.
<?php trait GravityForm{ function GravityForm_send_notifications($form_id, $entry_id){ // Get the array info for our forms and entries // that we need to send notifications for $form = RGFormsModel::get_form_meta($form_id); $entry = RGFormsModel::get_lead($entry_id); // Loop through all the notifications for the // form so we know which ones to send foreach($form['notifications'] as $id => $info){ } // Send the notifications GFCommon::send_notifications($notification_ids, $form, $entry); } function GravityForm_execute_hooks($form_id, $entry_id){ $form = GFAPI::get_form( $form_id ); $entry = GFAPI::get_entry( $entry_id ); $registered_addons = GFAddOn::get_registered_addons( ); foreach( $registered_addons as $reg){ $execute = $reg::get_instance(); foreach($registered_addons as $addon){ $execute->maybe_process_feed( $entry, $form); } } } return true; } }
What are particle animations? Particle network animations in JavaScript typically involve creating visual representations of… Read More
BOOKING SOLUTIONS 202x This is my take on a subset of booking, appointment, PMS or… Read More
THE GOAL Create a system cron for WordPress, that is accessible and can be easily… Read More
2024, what's cooking? Slowly getting into the 2024 spirit. 3 projects coming to a close… Read More
Short look back at 2023 This has been a busy and interesting year. I am… Read More
Elementor Pro provides grid containers as an experimental feature. The options provided are limited, when… Read More