From bb0cbe3f557d16714ca109a28c2877d178adc94f Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Tue, 6 Sep 2022 02:50:35 +0000 Subject: [PATCH] Script Loader: Pass startOfWeek setting to @wordpress/date Allows the block editor to respect the site's Week Starts On setting by defining `i10n.startOfWeek` when initialising the `@wordpress/date` module. This is a backport of https://github.com/WordPress/gutenberg/pull/41648. See #56467. Props andrewserong. git-svn-id: https://develop.svn.wordpress.org/trunk@54079 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 6c8425ec51..11858ec9bf 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -404,6 +404,7 @@ function wp_default_packages_inline_scripts( $scripts ) { /* translators: %s: Duration. */ 'past' => __( '%s ago' ), ), + 'startOfWeek' => (int) get_option( 'start_of_week', 0 ), ), 'formats' => array( /* translators: Time format, see https://www.php.net/manual/datetime.format.php */