gform_entry_list_bulk_actions

gform_entry_list_bulk_actions

DescriptionUsageParametersExample(s)PlacementSinceSource Code

Description
The 「gform_entry_list_bulk_actions」 filter in Gravity Forms allows the drop down of available bulk actions on the entries list to be modified. This filter works well with the gform_entry_list_action action for handling the custom actions added.
Usage
The following would apply to all forms:
1add_filter( 'gform_entry_list_bulk_actions', 'your_function_name', 10, 2 );
To limit the scope of your function to a specific form, append the form id to the end of the hook name. (format:gform_entry_list_bulk_actions_FORMID)
1add_filter( 'gform_entry_list_bulk_actions_21', 'your_function_name', 10, 2 );

Parameters

$actions array
An array of the bulk actions to be used in the drop down list.

$form_id int
The ID of the current form.

Example(s)
12345add_filter( 'gform_entry_list_bulk_actions_21', 'add_actions', 10, 2 );function add_actions( $actions, $form_id ){    $actions['my_custom_action'] = 'My Custom Action';    return $actions;}
Placement
Your code snippet should be placed in the functions.php file of your active theme.
Since
Gravity Forms Version 2.2.4.
Source Code
This filter is located in the GF_Entry_List_Table::get_bulk_actions() in gravityforms/entry_list.php.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注