Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds approval status to export entries conditional logic #2252

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions includes/class-gravityview-entry-approval.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,44 @@ private function add_hooks() {
add_action( 'gravityview/approve_entries/updated', array( $this, '_trigger_notifications' ) );

add_action( 'check_admin_referer', [ $this, 'resend_gf_notifications' ], 10, 2 );

add_filter( 'gform_field_filters', [ $this, 'add_approval_field_filter' ] );

}

/**
* Adds approval status filter to the filter list (Export Entries conditional logic).
*
* @since TBD
*
* @param array $filters The existing filters.
* @param array $form The form array.
*
* @return array The modified filters.
*/
public function add_approval_field_filter( $filters ) {
$filters[] = [
'key' => 'is_approved',
'text' => esc_html__( 'Approval Status', 'gk-gravityview' ),
'preventMultiple' => false,
'operators' => [ 'is' ],
'values' => [
[
'value' => '1',
'text' => esc_html__( 'Approved', 'gk-gravityview' ),
],
[
'value' => '2',
'text' => esc_html__( 'Disapproved', 'gk-gravityview' ),
],
[
'value' => '3',
'text' => esc_html__( 'Unapproved', 'gk-gravityview' ),
],
],
];

return $filters;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h

= develop =

#### 🚀 Added
* Support for entry approval statuses in conditional logic on the Gravity Forms Export Entries page.

#### 🐛 Fixed
* Fatal error when searching entries by approval status in Views joined with another form using the Multiple Forms extension.
* Some merge tag modifiers (e.g., `maxwords`) were not being processed.
Expand Down