2.9.4: Fix duplicate settings notice and pattern ABSPATH guards#6
Merged
Conversation
The settings page manually added a Settings saved notice on top of the one the Settings API already queues via options.php, showing it twice. Remove the manual notice and render the queued one. Bump to 2.9.4.
Plugin Check flagged all eight patterns/mega-menu-*.php files with missing_direct_file_access_protection. The files ship in the distribution (mega-menu loads them at runtime), so they cannot be excluded from the check; add the direct-access guard instead. Document the convention for future pattern files in CLAUDE.md and record the change under 2.9.4.
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
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
Two admin/quality fixes, released together as 2.9.4.
Fixed — duplicate "Settings saved." notice
The Settings → Aludra page rendered its own "Settings saved." notice on top of the one the Settings API already queues via
options.php, so the message appeared twice after saving. Removed the redundant manualadd_settings_error()and letsettings_errors()render the single queued message.Security — pattern direct-access guards
Plugin Check reported
missing_direct_file_access_protectionon all eightpatterns/mega-menu-*.phpfiles. These files ship in the distribution (mega-menuincludes them at runtime to capture their markup), so they can't be excluded from the check via.distignore. Added the standardif ( ! defined( 'ABSPATH' ) ) { exit; }guard to each — a no-op on the normal include path, and it doesn't affectget_file_data()header parsing.Documented the guard as a convention for future pattern files (including upcoming page patterns) in
CLAUDE.md.Version
Bumped to 2.9.4 across
aludra.php,readme.txt, andCHANGELOG.md.Testing
php -lclean on the settings page and all eight pattern files.