lj-maintenance-mode icon indicating copy to clipboard operation
lj-maintenance-mode copied to clipboard

Maintenance Mode 2.5.2 - Enhancements & Fixes 37, 43, 44 and 47

Open john-lang-86 opened this issue 3 years ago • 1 comments

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)
    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 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

  • 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)
    1. Added filter "ljmm_css_login_filename".
    2. 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)
    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 lukasjuhas/lj-maintenance-mode#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 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)
    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.

john-lang-86 avatar Jan 08 '22 10:01 john-lang-86

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.

john-lang-86 avatar Apr 03 '22 04:04 john-lang-86