You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds direct file access protection to plugin PHP files to prevent them from being executed outside of the WordPress runtime.
Why?
WordPress.org coding standards require plugin PHP files to block direct access when WordPress is not loaded. Learn more here
How?
The PR adds a standard abspath guard at the top of affected PHP files. This ensures the files exit early when accessed directly, while leaving normal WordPress execution completely unchanged. No functional or behavioral logic was modified.
Testing Instructions
Install Plugin Check Plugin
Choose Two Factor, Categories = "Plugin Repo" and Types = "Error" & "Warning"
see results
apply fix
see results
Screenshots or screencast
Changelog Entry
Security - Added direct file access protection to plugin files to align with WordPress.org security guidelines.
Fixes #759
What?
Adds direct file access protection to plugin PHP files to prevent them from being executed outside of the WordPress runtime.
Why?
WordPress.org coding standards require plugin PHP files to block direct access when WordPress is not loaded. Learn more here
How?
The PR adds a standard abspath guard at the top of affected PHP files. This ensures the files exit early when accessed directly, while leaving normal WordPress execution completely unchanged. No functional or behavioral logic was modified.
Testing Instructions
Screenshots or screencast
Changelog Entry