Codeinwp / wp-maintenance-mode

Adds a splash page to your site that lets visitors know your site is down for maintenance. Full access to the back- & front-end is optional.
https://wordpress.org/plugins/wp-maintenance-mode/
160 stars 81 forks source link

Add option to enable/disable maintenance mode from one place #298

Closed girishpanchal30 closed 1 year ago

girishpanchal30 commented 2 years ago

Close #295

github-actions[bot] commented 2 years ago

Plugin build for 13905d2cad6a03fbc4262c8a90e8affd77819ff1 is ready :bellhop_bell:!

selul commented 2 years ago

@girishpanchal30 can you do a rebase and check with the latest version how it behaves ?

girishpanchal30 commented 2 years ago

@selul Sure, I'll check and update you here.

girishpanchal30 commented 2 years ago

@selul

I have made some changes to make it compatible with the latest version. Now ticket is Ready for testing. May be QA team find out the issues. @irinelenache Can you please do a retest?

Thanks

irinelenache commented 2 years ago

@selul @girishpanchal30 I think we should make a clear decision about how this feature should work because now there are some issues happening:

My idea is to just have two simple controls on the network dashboard:

  1. Yes/No option asking the user if he wants to manage the status from one place
  2. Status Activated/Deactivated (if the user selected yes for the first one)

Let me know your thoughts on this 🙏

Also, you can check the issues i mentioned on this instance:

URL : https://multisite.s.themeisle.com/
Username : multisite
Password : RC8O3Z6M
girishpanchal30 commented 2 years ago

@irinelenache

My idea is to just have two simple controls on the network dashboard:

  1. Yes/No option asking the user if he wants to manage the status from one place
  2. Status Activated/Deactivated (if the user selected yes for the first one)

The idea is very pretty and simple. We can ask Yes/No when the plugin is activated on the network site.

@selul what do you think?

Thanks

girishpanchal30 commented 1 year ago

@irinelenache

I've implement your idea in this PR, please check with the PR build zip.

  1. Yes/No option asking the user if he wants to manage the status from one place

For this option, I've chosen to add a filter so the user can disable this feature.

add_filter( 'wpmm_manage_from_network_dashboard', '__return_false' );

Add this filter in your active theme functions.php file.

Status Activated/Deactivated (if the user selected yes for the first one)

https://tinyurl.com/2m6trvnc

Please check and let me know if you have any other suggestions as well.

Thanks