wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_is_stream › WordPress Function

Since3.5.0
Deprecatedn/a
wp_is_stream ( $path )
Parameters:
  • (string) $path The resource path or URL.
    Required: Yes
Returns:
  • (bool) True if the path is a stream URL.
Defined at:
Codex:

Tests if a given path is a stream URL



Source

function wp_is_stream( $path ) {
	$scheme_separator = strpos( $path, '://' );

	if ( false === $scheme_separator ) {
		// $path isn't a stream.
		return false;
	}

	$stream = substr( $path, 0, $scheme_separator );

	return in_array( $stream, stream_get_wrappers(), true );
}