Bail on User save redirect for Admin modal.

@param string $location The destination URL.

@return string
435722
public function admin_modal_bail_user_redirect( $location ) {

		if ( ! pods_is_modal_window() ) {
			return $location;
		}

		global $user_id;

		$user = get_userdata( $user_id );

		if ( ! $user || is_wp_error( $user ) ) {
			return $location;
		}

		$field_args = (object) array(
			'options' => array(
				'pick_object' => 'user',
				'pick_val'    => '',
			),
			'value'   => array(
				$user->ID => $user->display_name,
			),
		);

		$this->admin_modal_bail( $user->ID, $user->display_name, $field_args );

		return $location;

	}
1345893
public static function redirect($location, $permanent = false)
    {
        $response = new self(
            $permanent ? Status::MOVED_PERMANENTLY : Status::SEE_OTHER,
            new StringStream('')
        );
        $response->setHeader('Location', $location);
        return $response;
    }
987083
public function getRedirectLocation($parameters, $access_token) {
        $location = array();
        array_push($location, $parameters['redirect_uri'] . '#state=' . $parameters['state']);
        array_push($location, 'access_token=' . $access_token);
        array_push($location, 'token_type=Bearer');

        return implode('&', $location);
    }
775258
public function redirect($location, $status = 302)
    {
        if (!$location) {
            return;
        }
        $this->status($status);
        $headers = $this->headers();
        $headers['Location'] = $location;
        return $this;
    }
1192104
public function set_redirect_location($location) {
	if (self::$send_status_headers == false && base::$debug) {
		trigger_error('location will not be send out unless response::$send_status_headers is true', E_USER_NOTICE);
	}
	
	$this->redirect_location = $location;
}
558635
public function withRedirect($url, $status = null)
        {
            $response = $this->withHeader('Location', (string)$url);
            if (is_null($status) && $this->getStatusCode() === 200) {
                $status = 302;
            }
            if (!is_null($status)) {
                return $response->withStatus($status);
            }
            return $response;
        }
672713
static function Redirect($target, $redirectHeader = "", $noExit = false)
    {
        session_write_close();
        if ($redirectHeader)
        {
            header($redirectHeader);
        }
        header("Location: ". $target);
        if (!$noExit)
        {
            exit();
        }
    }
222362
public function getCellEntry($location)
    {
        if ($location instanceof Zend_Gdata_Spreadsheets_CellQuery) {
            $uri = $location->getQueryUrl();
        } else {
            $uri = $location;
        }

        return parent::getEntry($uri, 'Zend_Gdata_Spreadsheets_CellEntry');
    }
142213
private function _redirect($location)
	{
		$locationUrl = new Url($location);

		// if the location header was relative (bleh) add the host
		if(!$locationUrl->hasHost())
		{
			$locationUrl = $this->_url->getUrlForPath($location);
		}

		if($this->_redirects > self::MAX_REDIRECTS)
		{
			throw new Error\BadRequest("Exceeded maximum redirects");
		}

		$this->_redirects++;

		return $this->_dispatchRequest(
			new Request('GET', $locationUrl, $this->_headers));
	}
219519
public static function redirect($location, $permanent = false)
    {
        $redirect = new static($permanent ? 301 : 302);
        $redirect->setHeader('Location', $location);

        return $redirect;
    }
990667
public function viewBreadcrumbAction(Location $location)
    {
        /** @var WhiteOctober\BreadcrumbsBundle\Templating\Helper\BreadcrumbsHelper $breadcrumbs */
        $breadcrumbs = $this->get('white_october_breadcrumbs');

        $locationService = $this->getRepository()->getLocationService();
        $path = $location->path;

        // The root location can be defined at site access level
        $rootLocationId = $this->getConfigResolver()->getParameter('content.tree_root.location_id');

        /** @var eZ\Publish\Core\Helper\TranslationHelper $translationHelper */
        $translationHelper = $this->get('ezpublish.translation_helper');

        $isRootLocation = false;

        // Shift of location "1" from path as it is not a fully valid location and not readable by most users
        array_shift($path);

        for ($i = 0; $i < count($path); ++$i) {
            $location = $locationService->loadLocation($path[$i]);
            // if root location hasn't been found yet
            if (!$isRootLocation) {
                // If we reach the root location We begin to add item to the breadcrumb from it
                if ($location->id == $rootLocationId) {
                    $isRootLocation = true;
                    $breadcrumbs->addItem(
                        $translationHelper->getTranslatedContentNameByContentInfo($location->contentInfo),
                        $this->generateUrl($location)
                    );
                }
            }
            // The root location has already been reached, so we can add items to the breadcrumb
            else {
                $breadcrumbs->addItem(
                    $translationHelper->getTranslatedContentNameByContentInfo($location->contentInfo),
                    $this->generateUrl($location)
                );
            }
        }

        // We don't want the breadcrumb to be displayed if we are on the frontpage
        // which means we display it only if we have several items in it
        if (count($breadcrumbs) <= 1) {
            return new Response();
        }

        return $this->render(
            'eZDemoBundle::breadcrumb.html.twig'
        );
    }
839051
public function redirectToLocation(Location $location, string $uriFragment = ''): RedirectResponse
    {
        return $this->redirectToRoute('_ezpublishLocation', [
            'locationId' => $location->id,
            '_fragment' => $uriFragment,
        ]);
    }
941449
public function viewParentExtraInfoAction(Location $location)
    {
        $repository = $this->getRepository();
        $parentLocation = $repository->getLocationService()->loadLocation($location->parentLocationId);

        // TODO once the keyword service is available replace part this subrequest by a full symfony one

        return $this->render(
            'eZDemoBundle:parts/blog:extra_info.html.twig',
            array('location' => $parentLocation)
        );
    }
150867
public static function doRedirect($location) {
        if ( headers_sent() ) {
            // TODO: Check if this is fixed in PHP 70200
            // https://bugs.php.net/bug.php?id=74892
            if ( PHP_VERSION_ID >= 70000 ) {
                $location = U::addSession($location);
            }
            echo('<a href="'.$location.'">Continue</a>'."\n");
        } else {
            if ( ini_get('session.use_cookies') == 0 ) {
                $location = U::addSession($location);
            }
            header("Location: $location");
        }
    }
1022885
protected function redirect($location = null, $statusCode = 302)
    {
        return $this->response->redirect(url($location), true, $statusCode);
    }
204101
public static function noframes($location = 'top.location.href')
	{
		// Only load once
		if (isset(self::$loaded[__METHOD__]))
		{
			return;
		}

		// Include MooTools framework
		self::framework();

		//$js = "window.addEvent('domready', function () {if (top == self) {document.documentElement.style.display = 'block'; }" .
		//	" else {top.location = self.location; }});";
		$js = "jQuery(document).ready(function($){
			if (top == self) {
				document.documentElement.style.display = 'block';
			} else {
				top.location = self.location;
			}
		});";
		$document = App::get('document');
		$document->addStyleDeclaration('html { display:none }');
		$document->addScriptDeclaration($js);

		App::get('response')->headers->set('X-Frame-Options', 'SAMEORIGIN');

		self::$loaded[__METHOD__] = true;
	}
357843
public function getSpreadsheetFeed($location = null)
    {
        if ($location == null) {
            $uri = self::SPREADSHEETS_FEED_URI;
        } else if ($location instanceof Zend_Gdata_Spreadsheets_DocumentQuery) {
            if ($location->getDocumentType() == null) {
                $location->setDocumentType('spreadsheets');
            }
            $uri = $location->getQueryUrl();
        } else {
            $uri = $location;
        }

        return parent::getFeed($uri, 'Zend_Gdata_Spreadsheets_SpreadsheetFeed');
    }