Skip to content

Instantly share code, notes, and snippets.

/file1.php Secret

Created June 26, 2017 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/c3e457445a38f04e6f43bcdbe8383f77 to your computer and use it in GitHub Desktop.
Save anonymous/c3e457445a38f04e6f43bcdbe8383f77 to your computer and use it in GitHub Desktop.
/* Override Gravity Forms activate.php template */
add_filter( 'template_include', 'activation_page' );
function activation_page( $template ) {
$is_activation_page = isset( $_GET['page'] ) && $_GET['page'] == 'gf_activation';
if ( !$is_activation_page ) {
return $template;
}
$template_path = locate_template('activate.php');
if ( empty($template_path) ) {
return $template;
}
$template = $template_path;
return $template;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment