lj-maintenance-mode
lj-maintenance-mode copied to clipboard
Maintenance Mode 2.5.2 - Enhancements & Fixes 37, 43, 44 and 47
Hi Lukas,
Using Milestone 2.5.2 to track the draft pull request progress (Targeting April 11, 2022).
2.5.2
- Add john-lang-86/lj-maintenance-mode#15 shortcodes for dynamic page content. (Thanks to @john-lang-86)
- Add [ljmm_is_maintenance_mode_enabled] Show this content only when maintenance mode is enabled [/ljmm_is_maintenance_mode_enabled] shortcode.
- Add [ljmm_is_maintenance_mode_disabled] Show this content only when maintenance mode is disabled [/ljmm_is_maintenance_mode_disabled] shortcode.
- Add [ljmm_is_user_logged_in] Show this content only when the user is logged in to the website [/ljmm_is_user_logged_in] shortcode.
- Add [ljmm_is_user_logged_out] Show this content only when the user is logged out of the website, they are a public user [/ljmm_is_user_logged_out] shortcode.
- Add john-lang-86/lj-maintenance-mode#6 to expand the supported languages. (Thanks to @john-lang-86)
- Updated source code to be primarily human native language, removing the technology aspects (like %s) from the translatable phrases. This technique significantly improved the online translation success; while intentionally leaving 1 %s in the translation string list as a 'canary in the coal mine' test to see how well the translator handled it.
- Using 'PoEdit Pro' application and the DeepL/Google online ML translators. Keeping languages that had a > 98% online translation success, as anything less would be a disappointing user expectation and experience.
- As-at 28 Mar 2022, 145 locales (language_region combinations) have been translated. The full journey from RTFM to commit has been documented.
- Focus on WordPress installation statistics, in descending ranked order; then
- Focus on WordPress up-to-date translations, which indicates an active community.
- Focus on Stripe Payment Processor supported languages.
- Resolves review feedback about Twenty Twenty-Two theme compatability as part of 'Alternative to get_header hook/action' solution. (Thanks to @john-lang-86)
- Update screenshot-4.png for the new settings page options in 2.5.2, and add screenshot-10.png
- Update
README.md
andreadme.txt
files.
2.5.1.1
- Fix john-lang-86/lj-maintenance-mode#1 to improve trailing slash comparisons. (Thanks to @john-lang-86)
- Fix john-lang-86/lj-maintenance-mode#13 to allow a strict comparison for the site home page. (Thanks to @john-lang-86)
- Improved helpful messages to advanced setting options. (Thanks to @john-lang-86)
2.5.1
- Added Autoptimize message. (Thanks to @john-lang-86)
- Added "maintenance.min.login.css" feature. When detected in theme directory, this CSS file will be loaded in the standard login page to show users that maintenance mode is active. (Thanks to @john-lang-86)
- Added filter "ljmm_css_login_filename".
- Added filter "ljmm_css_login_url".
- Resolve lukasjuhas/lj-maintenance-mode#37 by adding 6 "Allowed" setting lists; match one on a list and maintenance mode lets the request proceed. (Thanks to @john-lang-86)
- Added "Allowed IPs (Contains)" setting, where $_SERVER[REMOTE_ADDR] matching requests will by-pass maintenance mode page.
- Added "Allowed URIs (Strict)" setting, where $_SERVER[REQUEST_URI] matching requests will by-pass maintenance mode page.
- Added "Allowed URIs (Contains)" setting, where $_SERVER[REQUEST_URI] matching requests will by-pass maintenance mode page.
- Added "Allowed Query Strings (Contains)" setting, where $_SERVER[QUERY_STRING] matching requests will by-pass maintenance mode page.
- Added "Allowed Referers (Contains)" setting, where $_SERVER[HTTP_REFERER] matching requests will by-pass maintenance mode page.
- Added "Allowed User Agents (Contains)" setting, where $_SERVER[HTTP_USER_AGENT] matching requests will by-pass maintenance mode page.
- Resolve lukasjuhas/lj-maintenance-mode#43 by switching from 'get_header' to 'wp_loaded' hook/action. (Thanks to @john-lang-86)
- Always allow '/wp-login.php' URI access requests.
- Always allow 'action=enter_recovery_mode&rm_token=' query string access requests.
- Fix lukasjuhas/lj-maintenance-mode#44 by always allowing access when "current_user_can('administrator')" check passes. (Thanks to @john-lang-86)
- Resolve lukasjuhas/lj-maintenance-mode#47 by adding 2 DIVs to maintenance mode page (wrapper and content); for more flexible CSS options. (Thanks to @john-lang-86)
- Add helpful messages to advanced setting options. (Thanks to @john-lang-86)
2.5
- Added WP Rocket message. (Thanks to @john-lang-86)
- Added "maintenance.min.frontend.css" feature. When detected in theme directory, this CSS file will be loaded in the frontend to show logged in users that maintenance mode is active. (Thanks to @john-lang-86)
- Added filter "ljmm_css_frontend_filename".
- Added filter "ljmm_css_frontend_url".
- Commit contains unit tested (functional) core for 'an exception allow list for non-logged in access to resources' for REMOTE_ADDR, REQUEST_URI (Strict Match), REQUEST_URI (Contains/Sloppy Match) and HTTP_REFERER; but still needs a settings page implementation. (Thanks to @john-lang-86)
- Acknowledgment: Language translations for new strings in the settings page in 2.5 are missing.
Screenshots
Version lifted to be v2.5.2
Added messages for WP Rocket (Cacher) and Autoptimize (Cacher).
Always by-pass maintenance mode page when current_user_can('administrator')
.
Add 2 extra DIV tags to maintenance mode page.
Add 6 new 'Allowed to by-pass the Maintenance Mode' list settings for specific request conditions.
Now checks for 'frontend' and 'login' CSS files in the theme folder.
Samples used in Unit Testing
-
Sample maintenance mode page using
maintenance.min.css
in theme directory. -
Sample login page using
maintenance.min.login.css
in theme directory; letting user know that maintenance mode is active (the light orange background behind the logo). -
Sample frontend page using
maintenance.min.frontend.css
in theme directory; letting logged in users know that maintenance mode is still active while they navigate around the site (the light orange background of all pages title row). -
Sample usage of the four new shortcodes, used on a custom member registration page.
-
WordPress edit mode of the member registration page; see the shortcodes in action.
-
Member registration page when maintenance mode is disabled.
-
Member registration page when maintenance mode is enabled and logged-out.
-
Member registration page when maintenance mode is enabled and logged-in.
-
Hope this helps.
Kind regards, John.
Hi @lukasjuhas,
Pull Request #50 is now available for review, discussion and feedback.
The 'Maintenance Mode' plugin with the new 2.5.2 features has been successfully unit/beta tested on these websites.
- Site: https://www.dataprofessionals.com.au/
- Site: https://www.installminisap.com/
- Site: https://www.johnlang.com.au/
Appreciate your time and effort to review these enhancements for inclusion in the 'Maintenance Mode' plugin.
Kind regards, @john-lang-86.