Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #58758


Ignore:
Timestamp:
07/07/2023 05:54:21 PM (22 months ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58758 – Description

    v2 v3  
    55This is because core unit tests often switch themes, resulting in a stale cache. However, sites in the wild also can also dynamically switch themes, and plugins may switch themes during their own unit tests. It seems this check is not ideal and is masking a more fundamental problem: the cached value is not invalidated when the theme is dynamically switched.
    66
    7 A simple fix is to invalidate the cache whenever `get_stylesheet_directory()` or `get_template_directory()` change.
     7A simple fix is to invalidate the cache whenever `get_stylesheet_directory()` or `get_template_directory()` change. This eliminates the need for the `WP_RUN_CORE_TESTS` entirely.