Forked from rafaehlers/gv-remote-entry-approval-notes.php
Created
March 10, 2023 19:56
-
-
Save zackkatz/0cd8a279cceb1de2d561016b0cc2a805 to your computer and use it in GitHub Desktop.
Prevent Entry Approval Notes from displaying on the View
This file contains hidden or 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