Fix: Enforce WordPress Coding Standards compliance#232
Merged
sushmak02 merged 4 commits intorelease-candidatefrom Mar 10, 2026
Merged
Fix: Enforce WordPress Coding Standards compliance#232sushmak02 merged 4 commits intorelease-candidatefrom
sushmak02 merged 4 commits intorelease-candidatefrom
Conversation
- Add ABSPATH direct access guards to 5 files missing them - Convert 80+ loose comparisons (== / !=) to strict (=== / !==) - Fix non-Yoda conditions to use constant-on-left pattern - Add strict flag (true) to all in_array() calls - Sanitize nonce values with sanitize_text_field(wp_unslash()) before wp_verify_nonce() - Replace print/exit with wp_die() for nonce failures in admin settings - Replace raw header() redirect with wp_safe_redirect() - Escape site_url() output with esc_url() - Remove closing PHP tags from PHP-only files - Fix equals sign alignment and double blank lines - Fix inline comment formatting Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sushmak02
approved these changes
Mar 10, 2026
Contributor
|
@akshayurankar48 Resolve conflicts |
…-coding-standards
Contributor
Author
@sushmak02 Updated |
sushmak02
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #231
functions.php,init.php,settings.php,meta-boxes.php,admin/index.php)==/!=) to strict (===/!==) across all PHP filestrue) to allin_array()calls missing itsanitize_text_field( wp_unslash() )beforewp_verify_nonce()in admin settingsprint+exitwithwp_die()for nonce failure messagesheader()redirect withwp_safe_redirect()site_url()output withesc_url()?>PHP tags from PHP-only filesPHPCS result: 0 errors, 0 warnings after fixes (was 95+ violations before).
Test plan
composer lint— should pass clean🤖 Generated with Claude Code