Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #58866, comment 9


Ignore:
Timestamp:
07/26/2023 03:29:02 PM (3 years ago)
Author:
thekt12

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58866, comment 9

    initial v1  
    77However, if we stick to the constants the way it is right now we will lose the ability to write test cases for some functions consuming it. i.e `locate_template` or `is_child_theme`
    88
    9 I personally feel both functions and constants are not the best approach, better would be to use global variables for both stylesheet and template.
     9I personally feel both functions and constants are not the best approach, **better would be to use global variables** for both stylesheet and template.
    1010
    1111This way we can call `wp_templating_constants()` functions again after `switch_theme` and update the variables. And also we address the looping issue and most of the performance regression caused by use of functions.