[wp-trac] [WordPress Trac] #56374: Rename class. files?

WordPress Trac noreply at wordpress.org
Sun Aug 14 09:04:08 UTC 2022


#56374: Rename class. files?
------------------------------+-----------------------------
 Reporter:  dingo_d           |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Script Loader     |    Version:
 Severity:  normal            |   Keywords:  dev-feedback
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 The current coding standards note that the name of the class files should
 be based on the class name with `class-` prepended, and the underscores
 replaced by hyphens ([https://developer.wordpress.org/coding-standards
 /wordpress-coding-standards/php/#naming-conventions rule in the
 handbook]), except for the three legacy files: `class.wp-
 dependencies.php`, `class.wp-scripts.php`, `class.wp-styles.php`.

 Seeing how in ticket #56268 the `wp-db.php` file was renamed to `class-
 wpdb.php`, with the bc layer, could the same be done to the above-
 mentioned classes?

 This would bring more uniformity to the codebase.

 I mean, the 'downside' would be that we'd still have these files in the
 codebase (like currently, we do still have the `wp-db.php` file, but it
 only holds the inclusion for the `class-wpdb.php`), but the upside would
 be more consistency. Plus it would be better for any future autoloading
 addition down the line IMO.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56374>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list