wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_is_stream › WordPress Function

Depuis3.5.0
Dépréciéen/a
wp_is_stream ( $path )
Paramètres:
  • (string) $path The resource path or URL.
    Requis: Oui
Retourne:
  • (bool) True if the path is a stream URL.
Défini(e) dans:
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 );
}