[wp-trac] [WordPress Trac] #37861: Renaming of class files for consistency
WordPress Trac
noreply at wordpress.org
Tue Sep 20 14:15:39 UTC 2022
#37861: Renaming of class files for consistency
-----------------------------------------+-------------------------------
Reporter: afragen | Owner: hellofromTonya
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.1
Component: Bootstrap/Load | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch changes-requested | Focuses: coding-standards
-----------------------------------------+-------------------------------
Changes (by SergeyBiryukov):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"54254" 54254]:
{{{
#!CommitTicketReference repository="" revision="54254"
Coding Standards: Rename WordPress Dependencies API class files.
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 (see the [https://developer.wordpress.org/coding-
standards/wordpress-coding-standards/php/#naming-conventions Naming
Conventions] section in the handbook), except for the three legacy files:
`class.wp-dependencies.php`, `class.wp-scripts.php`, `class.wp-
styles.php`.
To bring more consistency to the codebase and make it easier to implement
autoloading in the future, this commit renames those three legacy files to
conform to the coding standards:
* `wp-includes/class.wp-dependencies.php` → `wp-includes/class-wp-
dependencies.php`
* `wp-includes/class.wp-scripts.php` → `wp-includes/class-wp-scripts.php`
* `wp-includes/class.wp-styles.php` → `wp-includes/class-wp-styles.php`
Includes:
* Loading the new files from the old ones, for anyone that may have been
including the files directly.
* Replacing references to the old filenames with the new filenames.
Follow-up to [7970], [45654], [45662], [45663], [45678], [47197], [52026],
[53749].
Props afragen, schlessera, swissspidy, dingo_d, hellofromTonya,
SergeyBiryukov.
Fixes #37861. See #55647.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37861#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list