Skip to content

Instantly share code, notes, and snippets.

@rafaehlers
Last active June 29, 2019 00:01
Show Gist options
  • Save rafaehlers/a91bfe8a82e2201a05ded8f2e9a5b153 to your computer and use it in GitHub Desktop.
Save rafaehlers/a91bfe8a82e2201a05ded8f2e9a5b153 to your computer and use it in GitHub Desktop.
Filter to rename the "Approved the Entry" message in an Entry note.
<?php // Make sure to remove this line before pasting it on your theme's functions.php
add_filter( 'gravityview/entry_notes/get_notes', 'gv_modify_notes', 10, 2 );
function gv_modify_notes( $notes, $entry_id ) {
foreach($notes as $key => $note){
if (strpos( $note->value, 'Approved') !== false){
$note->value = "Aprovada!";
}
if (strpos( $note->value, 'Unapproved') !== false){
$note->value = "Não Aprovada!";
}
}
return $notes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment