src/Cortex/Router/Router.php
private function ensurePreviewVars(array $vars, array $uriVars)
    {
        if (! is_user_logged_in()) {
            return $vars;
        }

        foreach (['preview', 'preview_id', 'preview_nonce'] as $var) {
            if (! isset($vars[$var]) && isset($uriVars[$var])) {
                $vars[$var] = $uriVars[$var];
            }
        }

        return $vars;
    }
private function ensurePreviewVars(array $vars, array $uriVars)
    {
        if (! is_user_logged_in()) {
            return $vars;
        }

        foreach (['preview', 'preview_id', 'preview_nonce'] as $var) {
            if (! isset($vars[$var]) && isset($uriVars[$var])) {
                $vars[$var] = $uriVars[$var];
            }
        }

        return $vars;
    }
private function ensurePreviewVars ( array $ vars , array $ uriVars ) { if ( ! is_user_logged_in ( ) ) { return $ vars ; } foreach ( [ 'preview' , 'preview_id' , 'preview_nonce' ] as $ var ) { if ( ! isset ( $ vars [ $ var ] ) && isset ( $ uriVars [ $ var ] ) ) { $ vars [ $ var ] = $ uriVars [ $ var ] ; } } return $ vars ; }
To ensure preview works, we need to merge preview-related query string
to query arguments.

@param  array $vars
@param  array $uriVars
@return array
To ensure preview works we need to merge preview - related query string to query arguments .