Changeset 47329 for branches/3.9/tests/phpunit/includes/utils.php
- Timestamp:
- 02/20/2020 05:04:42 PM (5 years ago)
- Location:
- branches/3.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9
-
branches/3.9/tests/phpunit/includes/utils.php
r32182 r47329 335 335 } 336 336 337 function _rmdir( $path ) {338 if ( in_array(basename( $path ), array( '.', '..' ) ) ) {339 return;340 } elseif ( is_file( $path ) ) {341 unlink( $path );342 } elseif ( is_dir( $path ) ) {343 foreach ( scandir( $path ) as $file )344 _rmdir( $path . '/' . $file );345 rmdir( $path );346 }347 }348 349 337 /** 350 338 * Removes the post type and its taxonomy associations.
Note: See TracChangeset
for help on using the changeset viewer.