Skip to content

Instantly share code, notes, and snippets.

@reddo
Created November 23, 2016 12:48
Show Gist options
  • Save reddo/c055772405acdd077c4c75fdd1a297ce to your computer and use it in GitHub Desktop.
Save reddo/c055772405acdd077c4c75fdd1a297ce to your computer and use it in GitHub Desktop.
function custom_gform_confirmation( $confirmation, $form, $entry, $ajax ) {
if (!function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage') && !function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
return $confirmation . "<br> not translated";
} else {
$confirmation = function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage') ? qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($confirmation) : qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($confirmation);
return $confirmation . "<br> translated";
}
}
add_filter( 'gform_confirmation', 'custom_gform_confirmation', 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment