This file contains hidden or 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
// Integrate WPF Return into Gravity Forms Login Shortcode | |
function zf_check_for_wpf_return_cookie_on_login( $login_redirect, $sign_on ) { | |
// Check for WPF Return Cookie and ensure it's a valid post ID | |
if ( isset( $_COOKIE["wpf_return_to"] ) && is_numeric( $_COOKIE["wpf_return_to"] ) ) { | |
// Get Permalink for the specified post ID | |
$return_url = get_permalink( (int) $_COOKIE["wpf_return_to"] ); | |
// Set Redirect to the sanitized URL |
OlderNewer