Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #57487, comment 12


Ignore:
Timestamp:
01/28/2023 12:43:19 AM (23 months ago)
Author:
flixos90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57487, comment 12

    initial v1  
    33Reading through the conversation here, it seems we are mixing up environment and development mode, which I think is diverging a bit from the original intent. Yes, there is some overlap: `WP_ENVIRONMENT_TYPE` is for the environment, and to a degree it's possible to infer or guess certain things on the development mode. For example, if `WP_ENVIRONMENT_TYPE` is "development" or "local", it is ''likely'' that this environment is being used for development. However just ''likely'', not ''guaranteed'', as @azaozz has pointed out with an example above. So I think we should decouple the two topics - development mode and environment type are not the same.
    44
    5 For example, when you develop, you may be develop a plugin, or a theme, or contribute to core. Or maybe even something a bit more obscure like develop a drop-in. [55138], [55148], and [55155] are great examples for something where we need a way to signify whether a theme is being developed or not, because only if a theme is being developed the code should behave differently and not cache. If a plugin is being developed for example, the code should behave the same it would on a regular production site and use the cache.
     5For example, when you develop, you may be developing a plugin, or a theme, or contribute to core. Or maybe even something a bit more obscure like develop a drop-in. [55138], [55148], and [55155] are great examples for something where we need a way to signify whether a theme is being developed or not, because only if a theme is being developed the code should behave differently and not cache. If a plugin is being developed for example, the code should behave the same it would on a regular production site and use the cache.
    66
    77This leads me to think we need something closer to maybe a `WP_DEVELOPMENT_MODE` constant, which for example could be set to something like `core`, `plugin`, `theme`. By default it could be either not set, or an empty string, signifying that no particular development mode at all should be used.