Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#50166 closed feature request (duplicate)

A universal method to define a site's "state"

Reported by: joostdevalk's profile joostdevalk Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

For all sorts of reasons, plugins need to figure out whether the current site is a "live" site versus a "staging" or "development" site.

WooCommerce subscriptions solved this for themselves, as can be seen here. Jetpack has "staging mode". We at Yoast partly fixed it and will need to fix it even better soon. Others _must_ run into this problem, where you don't want to show certain notices on a staging site that you do want to show on a live site.

Would it be a good idea to set an option in the site settings, under Settings -> General, that toggles between three states:

  • development
  • staging
  • live

Where "live" would obviously be the default.

This would allow hosts that create staging sites to switch this toggle when they move a site to a staging environment etc. This way, Yoast SEO for instance could automatically block indexing of development and staging sites, and instead open up indexing on live sites. Other plugins like the Woo Subscriptions case above could also be solved much more uniformly.

Change History (5)

This ticket was mentioned in Slack in #hosting-community by joostdevalk. View the logs.


4 years ago

#2 @joostdevalk
4 years ago

  • Type changed from defect (bug) to feature request

#3 @ocean90
4 years ago

  • Keywords needs-design-feedback needs-patch dev-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #33161.

#4 @pfefferle
4 years ago

I like the idea. It is also a good way to whitelist dev settings in the dev-state, like dor example localhost requests for wp_remote_get, and similar features.

This ticket was mentioned in Slack in #forums by joyously. View the logs.


4 years ago

Note: See TracTickets for help on using tickets.