WP_Http::validate_redirects

Advertisement

Summery Summery

Validate redirected URLs.

Syntax Syntax

WP_Http::validate_redirects( string $location )

Parameters Parameters

$location

(Required) URL to redirect to.

Source Source

File: wp-includes/class-http.php

	public static function validate_redirects( $location ) {
		if ( ! wp_http_validate_url( $location ) ) {
			throw new Requests_Exception( __( 'A valid URL was not provided.' ), 'wp_http.redirect_failed_validation' );
		}
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.5 Introduced.

Advertisement

Leave a Reply