[wp-trac] [WordPress Trac] #63168: Coding Standards fixes for WP 6.9
WordPress Trac
noreply at wordpress.org
Mon Oct 13 22:44:33 UTC 2025
#63168: Coding Standards fixes for WP 6.9
-------------------------------------------------+-------------------------
Reporter: desrosj | Owner: (none)
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 6.9
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests changes- | Focuses: coding-
requested | standards
-------------------------------------------------+-------------------------
Changes (by westonruter):
* keywords: has-patch has-unit-tests => has-patch has-unit-tests changes-
requested
Comment:
Replying to [comment:26 SergeyBiryukov]:
> In [changeset:"60924" 60924]:
> {{{
> #!CommitTicketReference repository="" revision="60924"
> Coding Standards: Rename `$s` to `$search_term` in `wp-
admin/plugins.php`.
>
> Per the [https://developer.wordpress.org/coding-standards/wordpress-
coding-standards/php/#naming-conventions Naming Conventions]:
> > Don’t abbreviate variable names unnecessarily; let the code be
unambiguous and self-documenting.
>
> Follow-up to [15697].
>
> Props costdev, mukesh27.
> See #63168.
> }}}
The `$s` global is still being used elsewhere:
{{{
$ ack 'global(\s|.+?, )\$s(,|;)' src/wp-admin/
src/wp-admin/includes/class-wp-ms-sites-list-table.php
69: global $mode, $s, $wpdb;
src/wp-admin/includes/class-wp-links-list-table.php
51: global $cat_id, $s, $orderby, $order;
src/wp-admin/includes/class-wp-ms-themes-list-table.php
100: global $status, $totals, $page, $orderby, $order, $s;
548: global $status, $page, $s;
src/wp-admin/includes/class-wp-plugins-list-table.php
91: global $status, $plugins, $totals, $page, $orderby,
$order, $s;
375: global $s;
724: global $status, $page, $s, $totals
}}}
On `/wp-admin/plugins.php`, for example, there is currently an error (as
[https://wordpress.slack.com/archives/C02RQBWTW/p1760333953515639?thread_ts=1760278879.229739&cid=C02RQBWTW
noted] by @mukesh27 in Slack):
> Deprecated: strlen(): Passing null to parameter #1 ($string) of type
string is deprecated in /var/www/src/wp-admin/includes/class-wp-plugins-
list-table.php on line 297
Many more replacements would be needed, for example
[https://core.trac.wordpress.org/attachment/ticket/63168/search_term_global.diff
search_term_global.diff]
I worry about back-comapt problems for this change, however. There are
close to two hundred plugins that are looking at the `$s` global:
https://wpdirectory.net/search/01K7FVTRKDN6DTVNK82CYK72ZB
I think [60924] needs to be reverted.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63168#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list