-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maintenance Mode 2.5.2 - Enhancements & Fixes 37, 43, 44 and 47 #50
Open
john-lang-86
wants to merge
8
commits into
lukasjuhas:master
Choose a base branch
from
john-lang-86:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
* Added WP Rocket support. (Thanks to [@john-lang-86](https://github.com/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](https://github.com/john-lang-86/)) * Added filter "ljmm_css_frontend_filename". (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) * Added filter "ljmm_css_frontend_url". (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) * 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. * Missing language translations for new strings in settings page.
* Added WP Rocket support. (Thanks to [@john-lang-86](https://github.com/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](https://github.com/john-lang-86/)) * Added filter "ljmm_css_frontend_filename". (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) * Added filter "ljmm_css_frontend_url". (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) * 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. * Missing language translations for new strings in settings page. Signed-off-by: john-lang-86 <[email protected]>
* Added Autoptimize message. (Thanks to [@john-lang-86](https://github.com/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](https://github.com/john-lang-86/)) 1. Added filter "ljmm_css_login_filename". 2. Added filter "ljmm_css_login_url". * Fix Issue 37 by adding 6 "Allowed" setting lists; match one on a list and maintenance mode lets the request proceed. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) 1. Added "Allowed IPs (Contains)" setting, where $_SERVER[REMOTE_ADDR] matching requests will by-pass maintenance mode page. 2. Added "Allowed URIs (Strict)" setting, where $_SERVER[REQUEST_URI] matching requests will by-pass maintenance mode page. 3. Added "Allowed URIs (Contains)" setting, where $_SERVER[REQUEST_URI] matching requests will by-pass maintenance mode page. 4. Added "Allowed Query Strings (Contains)" setting, where $_SERVER[QUERY_STRING] matching requests will by-pass maintenance mode page. 5. Added "Allowed Referers (Contains)" setting, where $_SERVER[HTTP_REFERER] matching requests will by-pass maintenance mode page. 6. Added "Allowed User Agents (Contains)" setting, where $_SERVER[HTTP_USER_AGENT] matching requests will by-pass maintenance mode page. * Fix Issue 43 by switching from 'get_header' to 'wp_loaded' hook/action. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) 1. Always allow '/wp-login.php' URI access requests. 2. Always allow 'action=enter_recovery_mode&rm_token=' query string access requests. * Fix Issue 44 by always allowing access when "current_user_can('administrator')" check passes. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) * Fix Issue 47 by adding 2 DIVs to maintenance mode page (wrapper and content); for more flexible CSS options. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) * Add helpful messages to advanced setting options. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) * Add screenshot-4-2-5-1.png of settings page for 2.5.1. * Missing language translations for new strings added in the settings page in 2.5 & 2.5.1.
# Conflicts: # README.md
* Fix #1 to improve trailing slash cmoparisons. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) * Fix #13 to allow a strict comparison for the site home page. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) * Improved helpful messages to advanced setting options. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) Signed-off-by: john-lang-86 <[email protected]>
## 2.5.1.1
john-lang-86
changed the title
Maintenance Mode 2.5.1 - Enhancements & Fixes 37, 43, 44 and 47
Maintenance Mode 2.5.2 - Enhancements & Fixes 37, 43, 44 and 47
Jan 26, 2022
* Add #15 shortcodes for dynamic page content. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) 1. Add [ljmm_is_maintenance_mode_enabled] Show this content only when maintenance mode is enabled [/ljmm_is_maintenance_mode_enabled] shortcode. 2. Add [ljmm_is_maintenance_mode_disabled] Show this content only when maintenance mode is disabled [/ljmm_is_maintenance_mode_disabled] shortcode. 3. 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. 4. 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 #6 to expand the supported languages. (Thanks to [@john-lang-86](https://github.com/john-lang-86/)) 1. 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. 2. 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. 3. As-at 28 Mar 2022, 145 locales (language_region combinations) have been translated. The full [journey from RTFM to commit](#6) has been documented. * Focus on [WordPress installation statistics](https://wordpress.org/about/stats/), in descending ranked order; then * Focus on [WordPress up-to-date translations](https://make.wordpress.org/polyglots/teams/), which indicates an active community. * Focus on [Stripe Payment Processor](https://support.stripe.com/questions/supported-languages-for-stripe-checkout-and-payment-links) supported languages. * Resolves review [feedback about Twenty Twenty-Two theme compatability](https://wordpress.org/support/topic/love-this-plugin-so-much-i-donated/) as part of ['Alternative to get_header hook/action'](#11) solution. (Thanks to [@john-lang-86](https://github.com/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` and `readme.txt` files. Signed-off-by: john-lang-86 <[email protected]>
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.
Appreciate your time and effort to review these enhancements for inclusion in the 'Maintenance Mode' plugin. Kind regards, |
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.
Hi Lukas,
Using Milestone 2.5.2 to track the draft pull request progress (Targeting April 11, 2022).
2.5.2
README.md
andreadme.txt
files.2.5.1.1
2.5.1
2.5
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.
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.