wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_is_stream › WordPress Function

Od3.5.0
Przestarzałyn/a
wp_is_stream ( $path )
Parametry:
  • (string) $path The resource path or URL.
    Wymagane: Tak
Powrót:
  • (bool) True if the path is a stream URL.
Zdefiniowane na:
Codex:

Tests if a given path is a stream URL



Źródło

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