Skip to content

Instantly share code, notes, and snippets.

@rafaehlers
Created March 11, 2020 04:22
Show Gist options
  • Save rafaehlers/07191cba885053ad1af1a2e4c0b014b5 to your computer and use it in GitHub Desktop.
Save rafaehlers/07191cba885053ad1af1a2e4c0b014b5 to your computer and use it in GitHub Desktop.
Prevent Gravity Flow notes from appearing on the View
<?php // DO NOT COPY THIS LINE
add_filter( 'gravityview/entry_notes/get_notes', 'gv_remove_gravityflow_notes', 10, 2 );
function gv_remove_gravityflow_notes( $notes, $entry_id ) {
foreach($notes as $key => $note){
if ($note->note_type === 'gravityflow'){
unset( $notes[ $key] );
}
}
return $notes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment