Skip to content

2.9.4: Fix duplicate settings notice and pattern ABSPATH guards#6

Merged
jasperf merged 3 commits into
mainfrom
fix/duplicate-settings-saved-notice
Jul 13, 2026
Merged

2.9.4: Fix duplicate settings notice and pattern ABSPATH guards#6
jasperf merged 3 commits into
mainfrom
fix/duplicate-settings-saved-notice

Conversation

@jasperf

@jasperf jasperf commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

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 manual add_settings_error() and let settings_errors() render the single queued message.

Security — pattern direct-access guards

Plugin Check reported missing_direct_file_access_protection on all eight patterns/mega-menu-*.php files. These files ship in the distribution (mega-menu includes them at runtime to capture their markup), so they can't be excluded from the check via .distignore. Added the standard if ( ! defined( 'ABSPATH' ) ) { exit; } guard to each — a no-op on the normal include path, and it doesn't affect get_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, and CHANGELOG.md.

Testing

  • php -l clean on the settings page and all eight pattern files.
  • Manual: save on Settings → Aludra shows exactly one "Settings saved." notice.

jasperf added 2 commits July 13, 2026 13:57
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.
@imagewize imagewize deleted a comment from github-actions Bot Jul 13, 2026
@jasperf jasperf changed the title Fix/duplicate Settings Saved Notice 2.9.4: Fix duplicate settings notice and pattern ABSPATH guards Jul 13, 2026
@imagewize imagewize deleted a comment from github-actions Bot Jul 13, 2026
@github-actions

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@jasperf jasperf merged commit 541798c into main Jul 13, 2026
2 checks passed
@jasperf jasperf deleted the fix/duplicate-settings-saved-notice branch July 13, 2026 07:25
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.

1 participant