wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php
/**
 *  Saves a variable to cookies or if not enabled, to session.
 */
Saves a variable to cookies or if not enabled, to session.
Saves a variable to cookies or if not enabled to session .
function cf7msm_set( $var_name, $var_value )
{
    if ( empty($_COOKIE['cf7msm_check']) ) {
        $_SESSION[$var_name] = $var_value;
    } else {
        $json_encoded = '';
        if ( defined( 'JSON_UNESCAPED_UNICODE' ) ) {
            $json_encoded = json_encode( $var_value, JSON_UNESCAPED_UNICODE );
        } else {
            $json_encoded = json_encode( $var_value );
        }
        setcookie(
            $var_name,
            $json_encoded,
            0,
            COOKIEPATH,
            COOKIE_DOMAIN
        );
    }
}
function cf7msm_set ( $ var_name , $ var_value ) { if ( empty ( $ _COOKIE [ 'cf7msm_check' ] ) ) { $ _SESSION [ $ var_name ] = $ var_value ; } else { $ json_encoded = '' ; if ( defined ( 'JSON_UNESCAPED_UNICODE' ) ) { $ json_encoded = json_encode ( $ var_value , JSON_UNESCAPED_UNICODE ) ; } else { $ json_encoded = json_encode ( $ var_value ) ; } setcookie ( $ var_name , $ json_encoded , 0 , COOKIEPATH , COOKIE_DOMAIN ) ; } }
Saves a variable to cookies or if not enabled, to session.
Saves a variable to cookies or if not enabled to session .
//for php < 5.4