WordPress开发者和主题制作者的搜索引擎



wp_is_stream ›

Since3.5.0
已弃用n/a
wp_is_stream ( $path )
参数:
  • (string) $path The resource path or URL.
    Required: Yes
返回:
  • (bool) True if the path is a stream URL.
定义在:
文档:

Test if a given path is a stream URL



源码

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 );
}