Changes between Initial Version and Version 1 of Ticket #36335, comment 200
- Timestamp:
- 09/19/2016 09:39:16 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36335, comment 200
initial v1 10 10 In order to get this actually done and working I took some liberties regarding and source files that had more than one class; I split them apart and created a new file for each of them. 11 11 12 Given the work I've done on WPLib I've learned that working with an autoloader ends up being easier if the files names actually match the class names as opposed using a `class-` prefer with dashes and all lowercase; i.e. `WP_Query.php` instead of `class-wp-query.php`. The main benefit is that you can do a directory scan and get the class names without requiring any transform of the data. So I renamed all of the class files to use the same name as the class.12 Given the work I've done on WPLib I've learned that working with an autoloader ends up being easier if the files names actually match the class names as opposed using a `class-` prefer with dashes and all lowercase; i.e. `WP_Query.php` instead of `class-wp-query.php`. The main benefit is that you can do a directory scan and get the class names without requiring any transform. So I renamed all of the class files to use the same name as the class. 13 13 14 14 I also created two (2) `/autoload/` directories: `/wp-includes/autoload` and `/wp-admin/autoload`. I created subdirectories inside these autoload directories to organize the code better, e.g. `/wp-includes/autoload/filesystem` and `/wp-admin/customize/`, for example.