Pascal Birchler
5edb22187d
I18N: Introduce switch_to_user_locale().
...
This new function makes it easier to switch to a specific user’s locale by reducing duplicate code and storing the user’s ID as additional context for plugins to consume. Existing usage of `switch_to_locale()` in core has been replaced with `switch_to_user_locale()` where appropriate.
Also, this change ensures `WP_Locale_Switcher` properly filters `determine_locale` so that anyyone using the `determine_locale()` function will get the correct locale information when switching is in effect.
Props costdev.
Fixes #57123 .
See #26511 .
Built from https://develop.svn.wordpress.org/trunk@55161
git-svn-id: http://core.svn.wordpress.org/trunk@54694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-30 10:27:16 +00:00
..
2022-11-11 12:46:55 +00:00
2023-01-25 21:56:15 +00:00
2023-01-27 15:56:28 +00:00
2023-01-27 15:56:28 +00:00
2023-01-30 10:27:16 +00:00
2022-10-04 02:08:11 +00:00
2023-01-20 01:36:10 +00:00
2023-01-24 21:13:12 +00:00
2022-12-08 19:31:17 +00:00
2022-12-06 12:19:15 +00:00
2022-12-12 20:21:12 +00:00
2022-12-19 15:12:11 +00:00
2023-01-27 22:03:19 +00:00
2022-12-16 10:43:16 +00:00
2022-09-26 14:00:10 +00:00
2022-10-11 15:00:12 +00:00
2022-11-26 21:01:17 +00:00
2022-09-26 22:43:10 +00:00
2022-11-29 15:51:14 +00:00
2022-09-20 16:26:10 +00:00
2023-01-26 20:01:12 +00:00
2023-01-19 12:21:19 +00:00
2023-01-18 11:40:10 +00:00
2022-11-11 16:26:12 +00:00
2023-01-24 14:42:17 +00:00
2022-10-10 18:22:11 +00:00
2022-10-10 18:22:11 +00:00
2022-11-10 03:01:14 +00:00
2022-11-29 15:51:14 +00:00
2022-11-29 15:51:14 +00:00
2022-11-07 13:35:12 +00:00
2023-01-15 15:24:12 +00:00
2022-12-15 21:32:17 +00:00
2022-09-15 12:32:08 +00:00
2022-11-29 15:51:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-20 15:43:29 +00:00
2022-09-12 15:47:14 +00:00
2022-11-16 16:36:14 +00:00
2022-09-12 15:47:14 +00:00
2022-10-11 18:46:13 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-11-29 21:00:14 +00:00
2022-11-23 21:30:13 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2023-01-30 10:27:16 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2023-01-30 10:27:16 +00:00
2022-11-08 13:29:16 +00:00
2022-11-25 15:12:16 +00:00
2022-11-25 15:12:16 +00:00
2022-11-29 15:51:14 +00:00
2022-09-26 22:43:10 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-10-21 21:12:14 +00:00
2022-12-15 21:32:17 +00:00
2022-12-15 21:32:17 +00:00
2022-09-12 15:47:14 +00:00
2023-01-13 14:22:12 +00:00
2023-01-13 14:22:12 +00:00
2022-09-19 22:53:10 +00:00
2022-09-19 22:53:10 +00:00
2022-10-07 19:17:12 +00:00
2022-11-17 18:15:19 +00:00
2023-01-30 10:27:16 +00:00
2023-01-10 14:00:36 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-10-18 18:16:16 +00:00
2022-09-20 14:26:10 +00:00
2022-09-26 22:10:16 +00:00
2022-11-13 13:51:20 +00:00
2023-01-14 10:49:12 +00:00
2022-09-12 15:47:14 +00:00
2022-09-26 22:10:16 +00:00
2022-09-12 15:47:14 +00:00
2023-01-06 10:35:15 +00:00
2022-10-04 03:59:13 +00:00
2023-01-30 10:27:16 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-10-04 23:01:13 +00:00
2022-09-12 15:47:14 +00:00
2022-10-24 14:56:16 +00:00
2022-09-28 22:19:10 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-10-18 18:16:16 +00:00
2022-09-12 15:47:14 +00:00
2022-09-28 14:59:10 +00:00
2022-11-23 21:30:13 +00:00
2022-11-26 09:39:13 +00:00
2023-01-18 09:58:16 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-11-29 15:51:14 +00:00
2022-12-20 15:12:11 +00:00
2022-10-11 15:00:12 +00:00
2023-01-26 18:39:13 +00:00
2022-09-12 15:47:14 +00:00
2023-01-25 22:09:13 +00:00
2022-09-20 01:36:09 +00:00
2022-11-08 17:31:13 +00:00
2022-09-12 15:47:14 +00:00
2022-11-29 15:51:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-11-26 09:39:13 +00:00
2022-10-18 16:11:16 +00:00
2023-01-28 20:58:12 +00:00
2022-09-20 14:17:12 +00:00
2022-09-20 14:17:12 +00:00
2022-09-20 14:17:12 +00:00
2022-12-12 11:51:11 +00:00
2022-11-29 15:51:14 +00:00
2023-01-25 01:40:12 +00:00
2023-01-09 00:42:15 +00:00
2022-09-20 01:36:09 +00:00
2023-01-18 11:40:10 +00:00
2022-12-15 21:32:17 +00:00
2022-11-26 21:01:17 +00:00
2023-01-11 13:59:13 +00:00
2023-01-23 15:54:10 +00:00
2023-01-15 14:57:13 +00:00
2023-01-15 14:57:13 +00:00
2023-01-19 08:53:13 +00:00
2023-01-27 22:14:12 +00:00
2022-12-15 21:32:17 +00:00
2023-01-11 15:23:13 +00:00
2023-01-30 10:27:16 +00:00
2023-01-18 11:20:13 +00:00
2023-01-26 23:03:14 +00:00
2023-01-27 23:07:13 +00:00
2022-11-11 01:01:12 +00:00
2022-10-13 17:24:15 +00:00
2023-01-26 23:03:14 +00:00
2022-09-20 02:51:09 +00:00
2022-12-09 11:54:13 +00:00
2023-01-30 10:27:16 +00:00
2022-11-29 15:51:14 +00:00
2022-10-18 18:16:16 +00:00
2022-12-07 21:19:19 +00:00
2023-01-12 23:24:12 +00:00
2022-12-14 22:54:14 +00:00
2023-01-05 15:27:16 +00:00
2023-01-30 10:27:16 +00:00
2023-01-19 08:53:13 +00:00
2023-01-19 07:34:14 +00:00
2023-01-16 20:39:10 +00:00
2022-12-13 12:26:15 +00:00
2023-01-20 00:21:15 +00:00
2022-11-24 14:18:15 +00:00
2022-12-15 11:03:11 +00:00
2023-01-18 11:40:10 +00:00
2023-01-23 16:35:12 +00:00
2022-09-14 12:48:16 +00:00
2022-12-27 12:23:15 +00:00
2022-12-22 11:08:19 +00:00
2022-09-21 11:43:13 +00:00
2023-01-18 11:40:10 +00:00
2022-09-14 18:44:09 +00:00
2022-12-23 11:38:15 +00:00
2022-11-29 15:51:14 +00:00
2023-01-30 10:27:16 +00:00
2023-01-30 10:27:16 +00:00
2022-10-17 12:41:11 +00:00