GFNotification
Class GFNotification
Handles notifications within Gravity Forms
Source: notification.php:11
Details
- Kind:
class - Namespace:
(global)
Methods
| Method | Description |
|---|---|
notification_page() | Displays the Notification page. |
notification_edit_page() | Builds the Notification Edit page. |
append_filtered_notification_email_fields() | Pass the field choices for the select field through the gform_email_fields_notification_admin filter to allow |
initialize_settings_renderer() | Initialize Plugin Settings fields renderer. |
get_settings_renderer() | Gets the current instance of Settings handling settings rendering. |
notification_list_page() | Displays the notification list page |
maybe_process_notification_list_action() | Processes a notification list action if needed. |
get_notification_services() | Get list of notification services. |
get_notification_events() | Get the notification events for the current form. |
is_valid_notification_email() | Validates email addresses within notifications. |
get_routing_field_types() | Gets supported routing field types. |
get_post_category_values() | Gets a dropdown list of available post categories |
delete_notification() | Delete a form notification |
duplicate_notification() | Duplicates a form notification. |
is_unique_name() | Checks if a notification name is unique. |
Method Reference
notification_page()
public static function notification_page()
Displays the Notification page.
If the notification ID is passed, the Notification Edit page is displayed. Otherwise, the Notification List page is displayed.
Returns
void
Since: Unknown
Source: notification.php:72
notification_edit_page()
public static function notification_edit_page( $form_id, $notification_id )
Builds the Notification Edit page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | int | The ID of the form that the notification belongs to | |
$notification_id | int | The ID of the notification being edited |
Returns
void
Source: notification.php:109
append_filtered_notification_email_fields()
public static function append_filtered_notification_email_fields( $fields, $form )
Pass the field choices for the select field through the gform_email_fields_notification_admin filter to allow
third-parties to add or remove arbitrary fields.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$fields | array | The form fields to be used as choices. | |
$form | array | The form belonging to the notification being configured. |
Returns
array
Since: 2.5.7
Source: notification.php:509
initialize_settings_renderer()
public static function initialize_settings_renderer()
Initialize Plugin Settings fields renderer.
Since: 2.5
Source: notification.php:520
get_settings_renderer()
public static function get_settings_renderer()
Gets the current instance of Settings handling settings rendering.
Returns
false|Settings
Since: 2.5
Source: notification.php:712
notification_list_page()
public static function notification_list_page( $form_id )
Displays the notification list page
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | int | The form ID to list notifications on. |
Returns
void
Since: Unknown
Source: notification.php:765
maybe_process_notification_list_action()
public static function maybe_process_notification_list_action()
Processes a notification list action if needed.
Returns
void
Since: Unknown
Source: notification.php:866
get_notification_services()
public static function get_notification_services()
Get list of notification services.
Returns
array— The notification services available.
Since: Unknown
Source: notification.php:904
get_notification_events()
public static function get_notification_events( $form )
Get the notification events for the current form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The current Form Object. |
Returns
array— Notification events available within the form.
Since: Unknown
Source: notification.php:934
is_valid_notification_email()
public static function is_valid_notification_email( $text )
Validates email addresses within notifications.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$text | String containing comma-separated email addresses. |
Returns
bool— True if valid. Otherwise, false.
Since: Unknown
Source: notification.php:964
get_routing_field_types()
public static function get_routing_field_types()
Gets supported routing field types.
Returns
array— $field_types Supported field types.
Since: Unknown
Source: notification.php:1014
get_post_category_values()
public static function get_post_category_values()
Gets a dropdown list of available post categories
Since: Unknown
Source: notification.php:1032
delete_notification()
public static function delete_notification( $notification_id, $form_id )
Delete a form notification
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$notification_id | int | The notification ID to delete | |
$form_id | int | array | Can pass a form ID or a form object |
Returns
int|false— The result from $wpdb->query deletion
Since: Unknown
Source: notification.php:1056
duplicate_notification()
public static function duplicate_notification( $notification_id, $form_id )
Duplicates a form notification.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$notification_id | int | The notification ID to duplicate. | |
$form_id | int | array | The ID of the form or Form Object that contains the notification. |
Returns
int|false— The result from $wpdb->query after duplication
Since: Unknown
Source: notification.php:1098
is_unique_name()
public static function is_unique_name( $name, $notifications )
Checks if a notification name is unique.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$name | string | The name to check. | |
$notifications | array | The notifications to check against. |
Returns
bool— Returns true if unique. Otherwise, false.
Since: Unknown
Source: notification.php:1147