Last active
March 10, 2023 19:56
-
-
Save rafaehlers/88ef4e6eabc4ba8aef4c544da7938e94 to your computer and use it in GitHub Desktop.
Prevent Entry Approval Notes from displaying on the View
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // DO NOT COPY THIS LINE | |
add_filter( 'gravityview/entry_notes/get_notes', 'gv_remove_entry_approval_notes', 10, 2 ); | |
function gv_remove_entry_approval_notes( $notes, $entry_id ) { | |
foreach($notes as $key => $note){ | |
if (strpos( $note->value, 'WordPress') !== false){ | |
unset( $notes[ $key] ); | |
} | |
} | |
return $notes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment