Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-direct.php

    r46679 r47122  
    132132                        return chgrp( $file, $group );
    133133                }
    134                 // Is a directory, and we want recursive
     134                // Is a directory, and we want recursive.
    135135                $file     = trailingslashit( $file );
    136136                $filelist = $this->dirlist( $file );
    … …  
    168168                        return chmod( $file, $mode );
    169169                }
    170                 // Is a directory, and we want recursive
     170                // Is a directory, and we want recursive.
    171171                $file     = trailingslashit( $file );
    172172                $filelist = $this->dirlist( $file );
    … …  
    199199                        return chown( $file, $owner );
    200200                }
    201                 // Is a directory, and we want recursive
     201                // Is a directory, and we want recursive.
    202202                $filelist = $this->dirlist( $file );
    203203                foreach ( $filelist as $filename ) {
    … …  
    328328         */
    329329        public function delete( $file, $recursive = false, $type = false ) {
    330                 if ( empty( $file ) ) { // Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem.
    331                         return false;
    332                 }
    333                 $file = str_replace( '\\', '/', $file ); // for win32, occasional problems deleting files otherwise
     330                if ( empty( $file ) ) {
     331                        // Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem.
     332                        return false;
     333                }
     334                $file = str_replace( '\\', '/', $file ); // For Win32, occasional problems deleting files otherwise.
    334335
    335336                if ( 'f' == $type || $this->is_file( $file ) ) {
    … …  
    340341                }
    341342
    342                 // At this point it's a folder, and we're in recursive mode
     343                // At this point it's a folder, and we're in recursive mode.
    343344                $file     = trailingslashit( $file );
    344345                $filelist = $this->dirlist( $file, true );
Note: See TracChangeset for help on using the changeset viewer.