Skip to content

Commit

Permalink
Create gpeb-show-admin-all-entries.php
Browse files Browse the repository at this point in the history
  • Loading branch information
spivurno authored Apr 2, 2022
1 parent deed60d commit 70ab9f0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions gp-entry-blocks/gpeb-show-admin-all-entries.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Gravity Perks // Entry Blocks // Show Admins All Entries
* https://gravitywiz.com/documentation/gravity-forms-entry-blocks/
*
* If your Entries block is configured to only show users their own entries, this snippet will allow you to show users
* with the "Administrator" role all entries.
*/
add_filter( 'gpeb_entries_query', function( $processed_filter_groups, $form_id, $block_context ) {
if ( current_user_can( 'administrator' ) ) {
$processed_filter_groups = array();
}
return $processed_filter_groups;
}, 10, 3 );

0 comments on commit 70ab9f0

Please sign in to comment.