- Timestamp:
- 07/09/2023 07:50:52 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-base.php
r55824 r56174 58 58 $folder = $this->find_folder( ABSPATH ); 59 59 60 // Perhaps the FTP folder is rooted at the WordPress install. 61 // Check for wp-includes folder in root. Could have some false positives, but rare. 60 /* 61 * Perhaps the FTP folder is rooted at the WordPress install. 62 * Check for wp-includes folder in root. Could have some false positives, but rare. 63 */ 62 64 if ( ! $folder && $this->is_dir( '/' . WPINC ) ) { 63 65 $folder = '/'; … … 306 308 } 307 309 308 // Only check this as a last resort, to prevent locating the incorrect install. 309 // All above procedures will fail quickly if this is the right branch to take. 310 /* 311 * Only check this as a last resort, to prevent locating the incorrect install. 312 * All above procedures will fail quickly if this is the right branch to take. 313 */ 310 314 if ( isset( $files[ $last_path ] ) ) { 311 315 if ( $this->verbose ) { … … 317 321 } 318 322 319 // Prevent this function from looping again. 320 // No need to proceed if we've just searched in `/`. 323 /* 324 * Prevent this function from looping again. 325 * No need to proceed if we've just searched in `/`. 326 */ 321 327 if ( $loop || '/' === $base ) { 322 328 return false; 323 329 } 324 330 325 // As an extra last resort, Change back to / if the folder wasn't found. 326 // This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... 331 /* 332 * As an extra last resort, Change back to / if the folder wasn't found. 333 * This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... 334 */ 327 335 return $this->search_for_folder( $folder, '/', true ); 328 336
Note: See TracChangeset
for help on using the changeset viewer.