Gravity_Forms\Gravity_Forms\Abilities\GF_Abilities_Handler_Notifications
Handles notification ability callbacks.
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-notifications.php:10
Details
- Kind:
class - Namespace:
Gravity_Forms\Gravity_Forms\Abilities
Methods
| Method | Description |
|---|---|
list_notifications() | List notifications for a form. |
send_notifications() | Send notifications for an entry. |
create_notification() | Create a notification on a form. |
update_notification() | Update one notification (partial merge by ID). |
delete_notification() | Delete one notification. |
sanitize() | Apply the admin editor's sanitization to a notification's content. |
Method Reference
list_notifications()
public static function list_notifications( $input )
List notifications for a form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | The ability input. |
Returns
array|\WP_Error
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-notifications.php:21
send_notifications()
public static function send_notifications( $input )
Send notifications for an entry.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | The ability input. |
Returns
array|\WP_Error
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-notifications.php:46
create_notification()
public static function create_notification( $input )
Create a notification on a form.
Targeted save via GFFormsModel::save_form_notifications() — no full-form round-trip. Returns the generated notification_id.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | The ability input. |
Returns
array|\WP_Error
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-notifications.php:122
update_notification()
public static function update_notification( $input )
Update one notification (partial merge by ID).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | The ability input. |
Returns
array|\WP_Error
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-notifications.php:161
delete_notification()
public static function delete_notification( $input )
Delete one notification.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | The ability input. |
Returns
array|\WP_Error
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-notifications.php:209
sanitize()
public static function sanitize( $notification )
Apply the admin editor's sanitization to a notification's content.
This mirrors the Settings-framework sanitizing that the abilities write path skips. It is a no- op for users who hold unfiltered_html.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$notification | array | The notification settings. |
Returns
array
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-notifications.php:247