WPCOM_VIP_Support_User::filter_wp_redirect PHP 메소드

filter_wp_redirect() 공개 메소드

Filters wp_redirect so we can replace the query string arguments and manipulate the admin notice shown to the user to reflect what has happened (e.g. role setting has been rejected as the user is not an A12n).
public filter_wp_redirect ( $location ) : string
$location
리턴 string
    public function filter_wp_redirect($location)
    {
        if (!$this->message_replace && !$this->registering_a11n) {
            return $location;
        }
        if ($this->message_replace) {
            $location = add_query_arg(array('update' => rawurlencode($this->message_replace)), $location);
            $location = esc_url_raw($location);
        }
        if ($this->registering_a11n) {
            $location = add_query_arg(array('update' => rawurlencode(self::MSG_MADE_VIP)), $location);
            $location = esc_url_raw($location);
        }
        return $location;
    }