[wp-trac] [WordPress Trac] #47632: Coding Standards fixes for WP 5.3
WordPress Trac
noreply at wordpress.org
Wed Jul 17 05:31:33 UTC 2019
#47632: Coding Standards fixes for WP 5.3
----------------------------+-------------------------------
Reporter: pento | Owner: pento
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 5.3
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses: coding-standards
----------------------------+-------------------------------
Comment (by pento):
For renaming files that violate
`WordPress.Files.FileName.InvalidClassFileName`, I think the procedure
will look something like this:
1. `svn mv src/wp-admin/custom-header.php src/wp-admin/includes/class-
custom-image-header.php`
2. Create a new file at `src/wp-admin/custom-header.php`, with this
content:
{{{#!php
<?php
/**
* Custom header image script.
*
* This file is deprecated, use 'wp-admin/includes/class-custom-image-
header.php' instead.
*
* @deprecated 5.3.0
* @package WordPress
* @subpackage Administration
*/
_deprecated_file( basename( __FILE__ ), '5.3.0', 'wp-admin/includes/class-
custom-image-header.php' );
/** Custom_Image_Header class */
require_once( ABSPATH . 'wp-admin/includes/class-custom-image-header.php'
);
}}}
3. Replace anywhere that's referring to `src/wp-admin/custom-header.php`
with the new location (including phpdocs, for example).
4. `svn add src/wp-admin/custom-header.php`
5. Then `svn ci` as normal.
The `svn mv` will link the history of `custom-header.php` to `class-
custom-image-header.php`, but I'm not sure if adding a new file with the
same name in the same commit will break that. I don't suppose any SVN
experts want to weigh in here?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47632#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list