wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_is_stream › WordPress Function

Da3.5.0
Deprecaton/a
wp_is_stream ( $path )
Parametri:
  • (string) $path The resource path or URL.
    Richiesto:
Ritorna:
  • (bool) True if the path is a stream URL.
Definito a:
Codex:

Tests if a given path is a stream URL



Sorgenti

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