Skip to content

Commit

Permalink
Script Loader: Pass startOfWeek setting to @wordpress/date
Browse files Browse the repository at this point in the history
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 WordPress/gutenberg#41648.

See #56467.
Props andrewserong.


git-svn-id: https://develop.svn.wordpress.org/trunk@54079 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
noisysocks authored and = committed Nov 4, 2022
1 parent 0407f9f commit e37fe99
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e37fe99

Please sign in to comment.