fix: resolve WordPress Plugin Check PHPCS violations#2
Merged
Conversation
- Fix 9 short ternary (?:) errors across 6 source files - Add phpcs:ignore for 3 intentional base64 usages in WpTokenStore - Remove ABSPATH guard from helpers.php (breaks CLI autoloader) - Update owlstack-core to v1.0.1 (includes PHPCS directives) - Update composer.json dev dependencies (WPCS, PHPCS installer) All plugin source and vendor/owlstack files now pass WordPress coding standards with zero errors and zero warnings.
- Fix plugin header: Text Domain: owlstack -> owlstack-wp
- Fix all 98 translation function text domain arguments from 'owlstack' to 'owlstack-wp'
- Keep menu/settings page slugs as 'owlstack' (these are NOT text domains)
- Add AGENTS.md with text domain rules to prevent this mistake from recurring
- Add CLAUDE.md with Claude-specific instructions
The text domain must match the plugin folder name ('owlstack-wp') per WordPress
Plugin Check requirements. The string 'owlstack' (without -wp) is only used as
the admin menu slug and settings page slug.
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
Resolves all WordPress Plugin Check PHPCS violations in both the plugin source and the bundled
owlstack-corevendor dependency.Changes
Plugin source (
src/)?:) errors across 6 files — replaced with explicit ternary expressionsphpcs:ignorecomments for 3 intentionalbase64_encode/base64_decodeusages inWpTokenStore(used for encrypted token storage)defined('ABSPATH') || exit;guard fromhelpers.php— it caused Composer autoloader toexit()when running CLI tools like PHPCSVendor dependency
owlstack/owlstack-corefrom v1.0.0 to v1.0.1 (see owlstack-core PR #10)phpcs:disabledirectives to all source files for WordPress Plugin Check compatibilityDev dependencies
wp-coding-standards/wpcsanddealerdirect/phpcodesniffer-composer-installerto require-devVerification
Before: 134 errors + 52 warnings in owlstack-core, 9 errors + 3 warnings in plugin source
After: 0 errors, 0 warnings across the entire plugin