Skip to content

Instantly share code, notes, and snippets.

@luistinygod
Last active November 10, 2015 00:54
Show Gist options
  • Save luistinygod/5939bb58556b6c6acd58 to your computer and use it in GitHub Desktop.
Save luistinygod/5939bb58556b6c6acd58 to your computer and use it in GitHub Desktop.
GravityView: Change the Update Entry success message
<?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