Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zackkatz/0488d4a645728eaede06 to your computer and use it in GitHub Desktop.
Save zackkatz/0488d4a645728eaede06 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