GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Attributes
GravityView_Bulk_Actions Class Reference

Handles interactions between GravityView and Gravity Forms' Bulk Actions menu on the Entries screen. More...

Public Member Functions

 __construct ()
 GravityView_Admin_Bulk_Actions constructor. More...
 
 process_bulk_action ()
 Capture bulk actions - gf_entries table. More...
 

Static Public Member Functions

static get_bulk_actions ( $form_id)
 Get an array of options to be added to the Gravity Forms "Bulk action" dropdown in a "GravityView" option group. More...
 

Static Public Attributes

static $bulk_update_message = ''
 

Private Member Functions

 get_gv_bulk_action ()
 Get the Bulk Action submitted value if it is a GravityView Approve/Unapprove action. More...
 

Static Private Attributes

static $bulk_action_prefixes
 

Detailed Description

Handles interactions between GravityView and Gravity Forms' Bulk Actions menu on the Entries screen.

Since
2.13.2

Definition at line 18 of file class-gravityview-bulk-actions.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

GravityView_Admin_Bulk_Actions constructor.

Definition at line 35 of file class-gravityview-bulk-actions.php.

References process_bulk_action().

Member Function Documentation

◆ get_bulk_actions()

static get_bulk_actions (   $form_id)
static

Get an array of options to be added to the Gravity Forms "Bulk action" dropdown in a "GravityView" option group.

Since
1.16.3
Parameters
int$form_idID of the form currently being displayed
Returns
array Array of actions to be added to the GravityView option group
Runs Filter:
gravityview/approve_entries/bulk_actions Modify the GravityView "Bulk action" dropdown list. Return an empty array to hide.
See also
https://gist.github.com/zackkatz/82785402c996b51b4dc9 for an example of how to use this filter
Since
1.16.3
Parameters
array$bulk_actionsAssociative array of actions to be added to "Bulk action" dropdown inside GravityView <optgroup>. Parent array key is the <optgroup> label, then each child array must have label (displayed text) and value (input value) keys
int$form_idID of the form currently being displayed

Definition at line 163 of file class-gravityview-bulk-actions.php.

References $form_id, GV\$i, and GravityView_Entry_Approval_Status\get_string().

Referenced by GravityView_Admin_ApproveEntries\add_scripts_and_styles().

◆ get_gv_bulk_action()

get_gv_bulk_action ( )
private

Get the Bulk Action submitted value if it is a GravityView Approve/Unapprove action.

Since
1.17.1
2.13.2 Moved to GravityView_Bulk_Actions class.
Returns
string|false If the bulk action was GravityView Approve/Unapprove, return the full string (gvapprove-16, gvunapprove-16). Otherwise, return false.

Definition at line 53 of file class-gravityview-bulk-actions.php.

References Utils\_POST().

Referenced by process_bulk_action().

◆ process_bulk_action()

process_bulk_action ( )

Capture bulk actions - gf_entries table.

GravityView_frontend::get_search_criteria() Convert the $_POST search request into a properly formatted request.

Returns
void|boolean

The extra '-' is to make sure that there are at least two items in array.

See also
https://github.com/katzwebservices/GravityView/issues/370

Definition at line 78 of file class-gravityview-bulk-actions.php.

References $entries, $form_id, GravityView_Entry_Approval_Status\APPROVED, GravityView_Entry_Approval_Status\DISAPPROVED, get_gv_bulk_action(), GravityView_frontend\get_search_criteria(), gravityview(), gravityview_get_entry_ids(), GravityView_Entry_Approval_Status\UNAPPROVED, and GravityView_Entry_Approval\update_bulk().

Referenced by __construct().

Field Documentation

◆ $bulk_action_prefixes

$bulk_action_prefixes
staticprivate
Initial value:
= array(
'approve' => 'gvapprove',
'disapprove' => 'gvdisapprove',
'unapprove' => 'gvunapprove',
)

Definition at line 26 of file class-gravityview-bulk-actions.php.

◆ $bulk_update_message

$bulk_update_message = ''
static

Definition at line 21 of file class-gravityview-bulk-actions.php.


The documentation for this class was generated from the following file: