WP_Http::validate_redirects( string $location )

In this article

Validate redirected URLs.

Parameters

$locationstringrequired
URL to redirect to.

Source

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

Changelog

VersionDescription
4.7.5Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.