mwform_secure_cookie

mwform_secure_cookie

Hook Type: filter

See hook in core

Displaying hooks found in version: mw-wp-form.5.1.0

apply_filters('mwform_secure_cookie') is found 2 times:

  • /classes/models/class.csrf.php line 42
    	public static function save_token() {
    		$saved_token   = static::saved_token();
    		static::$token = ! $saved_token ? static::generate_token() : $saved_token;
    		if ( ! $saved_token && ! headers_sent() ) {
    			$secure = apply_filters( 'mwform_secure_cookie', is_ssl() );
    			setcookie( static::KEY, static::$token, 0, COOKIEPATH, COOKIE_DOMAIN, $secure, true );
    		}
    	}
    
    	/**
    	 * Return set token.
    
  • /classes/models/class.session.php line 44
    		if ( isset( $_COOKIE[ $this->name ] ) ) {
    			$session_id = $_COOKIE[ $this->name ];
    		} else {
    			$session_id = sha1( wp_create_nonce( $this->name ) . ip2long( $this->get_remote_addr() ) . uniqid() );
    			$secure     = apply_filters( 'mwform_secure_cookie', is_ssl() );
    			try {
    				set_error_handler( array( 'MW_WP_Form_Session', 'error_handler' ) );
    				setcookie( $this->name, $session_id, 0, COOKIEPATH, COOKIE_DOMAIN, $secure, true );
    			} catch ( ErrorException $e ) {
    				// No process...
    			}