Using Gravity Forms ‘gform_zapier_actions’ PHP filter

The gform_zapier_actions Gravity Forms PHP filter allows you to modify the feed actions allowed (delete and edit).

Usage

add_filter('gform_zapier_actions', 'your_function_name', 10, 1);

Parameters

  • $actions (array): An array for the Edit and Delete actions for a Zapier Feed (includes all the HTML for each action link).

More information

See Gravity Forms Docs: gform_zapier_actions

Examples

Change Delete Action Text

Modify the delete action text for a Zapier Feed.

add_filter('gform_zapier_actions', 'change_actions', 10, 1);

function change_actions($actions){
    $delete = $actions['delete'];
    $delete = str_replace('Delete this item', 'Delete Feed', $delete);
    $delete = str_replace('>Delete', '>Delete Feed', $delete);
    $actions['delete'] = $delete;
    return $actions;
}

Remove Delete Action

Remove the delete action for a Zapier Feed.

add_filter('gform_zapier_actions', 'remove_delete_action', 10, 1);

function remove_delete_action($actions){
    unset($actions['delete']);
    return $actions;
}

Add Custom Action

Add a custom action for a Zapier Feed.

add_filter('gform_zapier_actions', 'add_custom_action', 10, 1);

function add_custom_action($actions){
    $actions['custom_action'] = '<a class="custom-action" href="#">Custom Action</a>';
    return $actions;
}

Modify Edit Action

Modify the edit action for a Zapier Feed.

add_filter('gform_zapier_actions', 'modify_edit_action', 10, 1);

function modify_edit_action($actions){
    $edit = $actions['edit'];
    $edit = str_replace('Edit this item', 'Edit Feed', $edit);
    $actions['edit'] = $edit;
    return $actions;
}

Change Action Order

Change the order of actions for a Zapier Feed.

add_filter('gform_zapier_actions', 'change_action_order', 10, 1);

function change_action_order($actions){
    $delete = $actions['delete'];
    unset($actions['delete']);
    $actions['delete'] = $delete;
    return $actions;
}