Make WordPress Core


Ignore:
Timestamp:
07/13/2023 12:27:06 AM (18 months ago)
Author:
peterwilsoncc
Message:

General: Introduce all development mode.

Introduce the development mode all as a a cover-all mode for the existing theme, plugin and core development modes. Developers can use the all mode if they are developing both themes and plugins, for example.

Introduce the utility function wp_in_development_mode() allowing developers to detect the mode via a parameter. If the development mode is set to all this function will always return true. If the development mode is specific then only the chosen mode will return true.

Follow up to [56079,56042].

Props flixos90.
Fixes #57487.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/deprecated.php

    r56126 r56223  
    52345234     * developer's workflow.
    52355235     */
    5236     $can_use_cached = wp_get_development_mode() !== 'theme';
     5236    $can_use_cached = ! wp_in_development_mode( 'theme' );
    52375237    $cache_group    = 'theme_json';
    52385238    $cache_key      = 'wp_get_global_styles_svg_filters';
Note: See TracChangeset for help on using the changeset viewer.