Skip to content

add phpcs:ignore for falsepositives#777

Merged
kasparsd merged 2 commits intoWordPress:masterfrom
masteradhoc:patch-9
Feb 2, 2026
Merged

add phpcs:ignore for falsepositives#777
kasparsd merged 2 commits intoWordPress:masterfrom
masteradhoc:patch-9

Conversation

@masteradhoc
Copy link
Collaborator

What?

Fixes PHPCS warnings iby addressing PrefixAllGlobals.NonPrefixedHooknameFound reports for core WordPress hooks/filters.

Why?

Running PHPCS with WordPress Coding Standards flags several hook invocations as “non-prefixed”. Most of these are core WordPress hooks/filters (wp_login_failed, login_redirect, login_footer) that must remain unprefixed to preserve expected WordPress behavior and compatibility.

How?

Added targeted line-level phpcs:ignore

Testing Instructions

  1. Run PHPCS before applying fix
  2. see the flags for class-two-factor-core.php and providers/class-two-factor-fido-u2f-admin-list-table.php
  3. Run PHPCS again

Screenshots or screencast

Changelog Entry

Fixed - Resolved PHPCS hook naming warnings by documenting intentional use of core and legacy unprefixed hooks.

@github-actions
Copy link

github-actions bot commented Feb 1, 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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: masteradhoc <masteradhoc@git.wordpress.org>

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

@kasparsd kasparsd merged commit 8b998d4 into WordPress:master Feb 2, 2026
29 checks passed
@masteradhoc masteradhoc deleted the patch-9 branch February 2, 2026 18:34
@jeffpaul jeffpaul added this to the 0.15.0 milestone Feb 2, 2026
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.

3 participants

Comments