WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #36335, comment 200


Ignore:
Timestamp:
09/19/2016 09:39:16 AM (4 years ago)
Author:
MikeSchinkel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36335, comment 200

    initial v1  
    1010In 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.
    1111
    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 nameswithout requiring any transform of the data.  So I renamed all of the class files to use the same name as the class.
     12Given 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.
    1313
    1414I 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.