Skip to content

Conversation

@john-lang-86
Copy link

@john-lang-86 john-lang-86 commented Jan 8, 2022

Hi Lukas,

Using Milestone 2.5.2 to track the draft pull request progress (Targeting April 11, 2022).

2.5.2

  • Add Add Shortcodes for Maintenance Mode and User Status john-lang-86/lj-maintenance-mode#15 shortcodes for dynamic page content. (Thanks to @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 Add New Language Translations 2.5.2 john-lang-86/lj-maintenance-mode#6 to expand the supported languages. (Thanks to @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 has been documented.
  • 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 and readme.txt files.

2.5.1.1

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)
    1. Added filter "ljmm_css_login_filename".
    2. Added filter "ljmm_css_login_url".
  • Resolve BackUpBuddy compatibility #37 by adding 6 "Allowed" setting lists; match one on a list and maintenance mode lets the request proceed. (Thanks to @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.
  • Resolve Maintenance hook #43 by switching from 'get_header' to 'wp_loaded' hook/action. (Thanks to @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 Admin is logged in not detected when instalation is in subfolder #44 by always allowing access when "current_user_can('administrator')" check passes. (Thanks to @john-lang-86)
  • Resolve 2 suggestions to your awesome plugin! #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)
    1. Added filter "ljmm_css_frontend_filename".
    2. 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
lj-maintenance-mode Version 2 5 2 (2022-01-26)

Added messages for WP Rocket (Cacher) and Autoptimize (Cacher).
lj-maintenance-mode Autoptimize message (2022-01-07)

Always by-pass maintenance mode page when current_user_can('administrator').
lj-maintenance-mode current_user_can Administrator (2022-01-08)

Add 2 extra DIV tags to maintenance mode page.
lj-maintenance-mode 2 extra DIVs (2022-01-07)

Add 6 new 'Allowed to by-pass the Maintenance Mode' list settings for specific request conditions.
lj-maintenance-mode Settings 2 5 1 (2022-01-08)

Now checks for 'frontend' and 'login' CSS files in the theme folder.
lj-maintenance-mode 3 CSS files in Theme (2022-01-08)

Samples used in Unit Testing

Hope this helps.

Kind regards,
John.

* 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 <john@johnlang.com.au>
* 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.
@john-lang-86 john-lang-86 marked this pull request as ready for review January 8, 2022 11:04
@john-lang-86 john-lang-86 marked this pull request as draft January 9, 2022 03:39
john-lang-86 and others added 2 commits January 15, 2022 09:05
* 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 <john@johnlang.com.au>
@john-lang-86 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
john-lang-86 and others added 2 commits April 3, 2022 13:29
* 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 <john@johnlang.com.au>
@john-lang-86 john-lang-86 marked this pull request as ready for review April 3, 2022 03:48
@john-lang-86
Copy link
Author

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.

  1. Site: https://www.dataprofessionals.com.au/
  2. Site: https://www.installminisap.com/
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant