Last active
November 10, 2015 00:54
-
-
Save luistinygod/5939bb58556b6c6acd58 to your computer and use it in GitHub Desktop.
GravityView: Change the Update Entry success message
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 | |
/** | |
* Change the update entry success message, including the link | |
* | |
* @param $message string The message itself | |
* @param $view_id int View ID | |
* @param $entry array The Gravity Forms entry object | |
* @param $back_link string Url to return to the original entry | |
*/ | |
function gv_my_update_message( $message, $view_id, $entry, $back_link ) { | |
$link = str_replace( 'entry/'.$entry['id'].'/', '', $back_link ); | |
return 'Entry Updated. <a href="'.esc_url($link).'">Return to the list</a>'; | |
} | |
add_filter( 'gravityview/edit_entry/success', 'gv_my_update_message', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment