Changeset 46222
- Timestamp:
- 09/20/2019 10:43:50 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/utils.php
r46215 r46222 371 371 function mask_input_value( $in, $name = '_wpnonce' ) { 372 372 return preg_replace( '@<input([^>]*) name="' . preg_quote( $name ) . '"([^>]*) value="[^>]*" />@', '<input$1 name="' . preg_quote( $name ) . '"$2 value="***" />', $in ); 373 }374 375 if ( ! function_exists( 'str_getcsv' ) ) {376 function str_getcsv( $input, $delimiter = ',', $enclosure = '"', $escape = '\\' ) {377 $fp = fopen( 'php://temp/', 'r+' );378 fputs( $fp, $input );379 rewind( $fp );380 $data = fgetcsv( $fp, strlen( $input ), $delimiter, $enclosure );381 fclose( $fp );382 return $data;383 }384 373 } 385 374
Note: See TracChangeset
for help on using the changeset viewer.