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.

Built from https://develop.svn.wordpress.org/trunk@54079
  • Loading branch information
noisysocks committed Sep 6, 2022
1 parent 3ee0ce7 commit f679cca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions 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
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-54078';
$wp_version = '6.1-alpha-54079';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit f679cca

Please sign in to comment.