Changeset 44506 for trunk/src/wp-includes/functions.php
- Timestamp:
- 01/09/2019 09:50:19 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r44481 r44506 5707 5707 */ 5708 5708 function wp_is_stream( $path ) { 5709 if ( false === strpos( $path, '://' ) ) { 5709 $scheme_separator = strpos( $path, '://' ); 5710 5711 if ( false === $scheme_separator ) { 5710 5712 // $path isn't a stream 5711 5713 return false; 5712 5714 } 5713 5715 5714 $wrappers = stream_get_wrappers(); 5715 $wrappers = array_map( 'preg_quote', $wrappers ); 5716 $wrappers_re = '(' . join( '|', $wrappers ) . ')'; 5717 5718 return preg_match( "!^$wrappers_re://!", $path ) === 1; 5716 $stream = substr( $path, 0, $scheme_separator ); 5717 5718 return in_array( $stream, stream_get_wrappers(), true ); 5719 5719 } 5720 5720
Note: See TracChangeset
for help on using the changeset viewer.