Skip to content

Conversation

@rodrigoprimo
Copy link

Trac ticket: https://core.trac.wordpress.org/ticket/64627


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions
Copy link

github-actions bot commented Feb 11, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props rodrigosprimo, mukesh27.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@mukeshpanchal27
Copy link
Member

@rodrigoprimo Could you please rebase your branch? Some parts of this PR were already committed in 259d1f9, so we’ll need to sync it with the latest trunk before proceeding.

…ted.php`

Remove `PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore` annotations from `__ngettext()` and `__ngettext_noop()`. Since PHPCompatibility 9.3.2, the `ReservedFunctionNames` sniff skips functions that have a `@deprecated` tag in their docblock, making these annotations unnecessary.

See PHPCompatibility/PHPCompatibility 917.
…Font_Collections_Controller`

Remove the `VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable` annotation from `get_items_permissions_check()`. The VariableAnalysis standard is not installed in WordPress Core. The annotation was probably carried over from Gutenberg, where VariableAnalysis is part of the PHPCS configuration, when the font library was merged into Core.
…Twenty-One

Remove three `WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound` annotations. The WPThemeReview standard is not installed in WordPress Core.

I believe these annotations were carried over from the upstream Twenty Twenty-One repository when the theme was imported into Core in 4b90066.
The `// WPCS: XSS OK.` comments use a legacy annotation format no longer
recognized by PHPCS.

This format was introduced in WPCS 0.4.0, deprecated in WPCS 2.0.0 (see
WordPress/WordPress-Coding-Standards 1580), and support was fully removed
in WPCS 3.0.0 (see WordPress/WordPress-Coding-Standards 1908) in favor of
the PHPCS native `phpcs:ignore` annotations.

Additionally, the `WordPress.Security.EscapeOutput` sniff these comments
reference is part of the `WordPress-Extra` standard, not the
`WordPress-Core` standard used in this repository.
…cons

The `CapitalPDangit` sniff does not check array keys.
…ecked in this repository

The `phpcs.xml.dist` configuration uses the `WordPress-Core` standard.
These annotations reference sniffs that are part of `WordPress-Extra`,
which is not included:

- `WordPress.Security.EscapeOutput`
- `WordPress.Security.NonceVerification`
- `WordPress.WP.AlternativeFunctions`
- `WordPress.PHP.DevelopmentFunctions`
- `WordPress.PHP.IniSet`

Some of these annotations were carried over from upstream theme
repositories or external plugins.

If in the future there is a decision to add `WordPress-Extra`, I think
it makes sense to evaluate each error/warning to decide what should be
ignored and what should not.
@rodrigoprimo rodrigoprimo force-pushed the fix/stale-phpcs-annotations branch from 6d96efd to 5405ccb Compare February 12, 2026 17:26
@rodrigoprimo
Copy link
Author

@mukeshpanchal27, thanks for the ping. I just rebased this PR with the latest from trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants