Last active
June 29, 2019 00:01
-
-
Save rafaehlers/a91bfe8a82e2201a05ded8f2e9a5b153 to your computer and use it in GitHub Desktop.
Filter to rename the "Approved the Entry" message in an Entry note.
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 // 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