public static function get_notification_post_category_values() { require_once GFCommon::get_base_path() . '/notification.php'; GFNotification::get_post_category_values(); }
public static function maybe_process_notification_list_action() { if (empty($_POST) || !check_admin_referer('gform_notification_list_action', 'gform_notification_list_action')) { return; } $action = rgpost('action'); $object_id = rgpost('action_argument'); switch ($action) { case 'delete': $notification_deleted = GFNotification::delete_notification($object_id, rgget('id')); if ($notification_deleted) { GFCommon::add_message(__('Notification deleted.', 'gravityforms')); } else { GFCommon::add_error_message(__('There was an issue deleting this notification.', 'gravityforms')); } break; case 'duplicate': $notification_duplicated = GFNotification::duplicate_notification($object_id, rgget('id')); if ($notification_duplicated) { GFCommon::add_message(__('Notification duplicates.', 'gravityforms')); } else { GFCommon::add_error_message(__('There was an issue duplicating this notification.', 'gravityforms')); } break; } }
public static function notification_page() { require_once 'notification.php'; //page header loaded in below function because admin messages were not yet available to the header to display GFNotification::notification_page(); }
public static function forms() { if (!GFCommon::ensure_wp_version()) { return; } $id = RGForms::get("id"); $view = RGForms::get("view"); if ($view == "entries") { require_once GFCommon::get_base_path() . "/entry_list.php"; GFEntryList::leads_page($id); } else { if ($view == "entry") { require_once GFCommon::get_base_path() . "/entry_detail.php"; GFEntryDetail::lead_detail_page(); } else { if ($view == "notification") { require_once GFCommon::get_base_path() . "/notification.php"; GFNotification::notification_page($id); } else { if (is_numeric($id)) { self::forms_page($id); } else { self::form_list_page(); } } } } }
/** * GFNotificationTable constructor. * * Sets required class properties and defines the list table columns * * @see GFNotification::get_notification_events * @see GFNotification::get_notification_services * * @param array $form The Form Object to use */ function __construct($form) { $this->form = $form; $this->notification_events = GFNotification::get_notification_events($form); $this->notification_services = GFNotification::get_notification_services(); $columns = array('cb' => '', 'name' => esc_html__('Name', 'gravityforms'), 'subject' => esc_html__('Subject', 'gravityforms')); if (count($this->notification_events) > 1) { $columns['event'] = esc_html__('Event', 'gravityforms'); } if (count($this->notification_services) > 1) { $columns['service'] = esc_html__('Service', 'gravityforms'); } $this->_column_headers = array($columns, array(), array(), 'name'); parent::__construct(); }
function column_service($notification) { $services = GFNotification::get_notification_services(); if (!rgar($notification, 'service')) { esc_html_e('WordPress', 'gravityforms'); } else { if (rgar($services, $notification['service'])) { $service = rgar($services, $notification['service']); echo rgar($service, 'label'); } else { esc_html_e('Undefined Service', 'gravityforms'); } } }