A WordPress-centric search engine for devs and theme authors



wp_is_stream ›

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:

Test if a given path is a stream URL



Source

function wp_is_stream( $path ) {
	$wrappers    = stream_get_wrappers();
	$wrappers_re = '(' . join( '|', $wrappers ) . ')';

	return preg_match( "!^$wrappers_re://!", $path ) === 1;
}