Joe McGill
716b7d4d26
Themes: Use original template paths when switching blogs.
...
This fixes a bug introduced by [57129] and [56635] in which deprecating the previous `TEMPLATEPATH` and `STYLESHEETPATH` constants in favor of `get_template_directory()` and `get_stylesheet_directory()` functions caused the active theme template path to change when using `switch_to_blog()`.
This introduces a new function, `wp_set_template_globals()`, which is called during the bootstrap process to store the template paths to new globals values `$wp_template_path` and `$wp_stylesheet_path`. This restores behavior to how things worked prior to [56635] but retains the ability for template values to be reset for better testability.
Related #18298 , #60025 .
Props joemcgill, flixos90, mukesh27, swissspidy, manfcarlo, metropolis_john, jeremyfelt.
Fixes #60290 .
Built from https://develop.svn.wordpress.org/trunk@57685
git-svn-id: http://core.svn.wordpress.org/trunk@57186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 19:26:08 +00:00
..
2023-09-25 17:06:34 +00:00
2023-07-11 05:03:23 +00:00
2024-02-17 15:24:08 +00:00
2023-05-03 10:03:21 +00:00
2023-06-22 14:36:26 +00:00
2022-08-29 12:46:10 +00:00
2022-08-29 12:46:10 +00:00
2023-09-17 15:23:22 +00:00
2023-07-09 19:52:24 +00:00
2023-12-07 15:14:27 +00:00
2024-01-26 14:20:12 +00:00
2024-02-05 22:23:06 +00:00
2022-03-22 16:25:03 +00:00
2024-02-12 12:07:10 +00:00
2021-09-09 13:59:56 +00:00
2024-01-30 10:30:20 +00:00
2024-01-03 21:59:19 +00:00
2023-06-14 06:34:27 +00:00
2023-06-14 06:34:27 +00:00
2024-02-20 07:27:06 +00:00
2023-06-14 06:34:27 +00:00
2023-06-14 06:34:27 +00:00
2024-01-08 23:19:16 +00:00
2023-08-24 09:01:16 +00:00
2023-09-08 09:32:23 +00:00
2023-09-14 12:46:20 +00:00
2023-06-22 14:36:26 +00:00
2024-02-16 21:47:12 +00:00
2023-09-09 09:28:26 +00:00
2024-02-16 21:47:12 +00:00
2023-09-12 15:23:18 +00:00
2024-01-07 16:09:21 +00:00
2024-02-16 21:47:12 +00:00
2024-02-16 21:47:12 +00:00
2024-02-16 21:47:12 +00:00
2024-02-16 21:47:12 +00:00
2024-02-16 21:47:12 +00:00
2023-08-14 09:59:20 +00:00
2023-06-14 12:57:20 +00:00
2023-09-22 19:58:16 +00:00
2020-11-14 16:54:08 +00:00
2024-02-17 15:24:08 +00:00
2023-09-22 19:58:16 +00:00
2024-02-16 21:47:12 +00:00
2023-09-22 19:58:16 +00:00
2023-11-15 09:33:26 +00:00
2024-02-21 17:34:13 +00:00
2024-02-13 13:24:10 +00:00
2022-10-04 03:47:15 +00:00
2023-09-22 19:58:16 +00:00
2022-03-10 19:22:01 +00:00
2023-09-08 09:32:23 +00:00
2023-11-22 17:44:24 +00:00
2023-09-22 19:58:16 +00:00
2024-01-11 17:44:12 +00:00
2023-09-26 00:27:12 +00:00
2023-11-28 20:24:22 +00:00
2023-04-23 04:02:18 +00:00
2023-09-22 19:58:16 +00:00
2023-06-14 06:34:27 +00:00
2023-05-08 22:37:24 +00:00
2023-12-01 01:35:28 +00:00
2023-09-10 07:33:22 +00:00
2024-01-10 11:57:15 +00:00
2022-07-20 22:15:10 +00:00
2022-09-19 23:24:11 +00:00
2023-06-22 14:36:26 +00:00
2024-02-08 20:36:14 +00:00
2024-01-10 11:57:15 +00:00
2021-12-07 12:20:02 +00:00
2024-02-21 18:15:14 +00:00
2024-02-05 22:23:06 +00:00
2024-02-02 17:48:15 +00:00
2024-02-02 17:48:15 +00:00
2022-07-29 09:22:10 +00:00
2022-10-04 03:47:15 +00:00
2024-02-17 15:24:08 +00:00
2023-11-06 09:27:23 +00:00
2023-11-26 16:43:30 +00:00
2024-02-18 14:45:13 +00:00
2022-09-20 02:51:09 +00:00
2022-09-20 02:51:09 +00:00
2023-12-08 21:26:29 +00:00
2024-02-17 15:24:08 +00:00
2023-09-17 15:23:22 +00:00
2023-09-21 01:27:26 +00:00
2023-07-09 20:07:22 +00:00
2024-02-20 07:27:06 +00:00
2024-02-20 07:27:06 +00:00
2024-02-09 19:50:14 +00:00
2023-06-22 14:36:26 +00:00
2024-02-16 21:47:12 +00:00
2024-02-02 17:48:15 +00:00
2021-05-09 20:27:02 +00:00
2023-03-10 07:04:20 +00:00
2023-12-11 12:11:22 +00:00
2023-09-08 10:03:21 +00:00
2024-02-21 19:26:08 +00:00
2022-11-29 15:51:14 +00:00
2024-02-12 16:53:13 +00:00
2024-02-16 21:47:12 +00:00
2023-12-04 19:51:23 +00:00
2023-11-17 13:29:26 +00:00
2023-09-09 09:28:26 +00:00