Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date: merge 6.4 and 6.5 compat files #58479

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Jan 30, 2024

Resolves #58431

What and how?

This commit merges the 6.4 and 6.5 compat changes for gutenberg_update_wp_date_settings(), and stores them in a single place in compat/6.5.

6.4 compat changes (already merged to Core for 6.4)

6.5 compat changes (needs backporting for 6.5)

Why?

Compat code consolidation and to avoid duplicate filters.

Testing Instructions

Fire up this branch and open the editor.

In the browser console, run wp.date.getSettings().

Check that properties exist for:

  1. timezone.offsetFormatted exists
  2. l10n.relative.* exists

Smoke test functionality.

  1. Follow test instructions in Timezone displays offset with decimals instead of minutes #56254 to see timezone offset
  2. Run wp.date.humanTimeDiff( new Date() ) in the console. You should see a relative translation "a second ago"

…e_wp_date_settings(), and stores them in a single place in compat/6.5.
@ramonjd ramonjd added Backwards Compatibility Issues or PRs that impact backwards compatability [Type] Code Quality Issues or PRs that relate to code quality labels Jan 30, 2024
@ramonjd ramonjd requested review from Mamaduka and afercia January 30, 2024 23:20
@ramonjd ramonjd self-assigned this Jan 30, 2024
@ramonjd ramonjd requested a review from spacedmonkey as a code owner January 30, 2024 23:20
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/compat/wordpress-6.4/script-loader.php
❔ lib/compat/wordpress-6.5/script-loader.php

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes work as expected. Thank you, @ramonjd!

@ramonjd ramonjd merged commit 82e22bf into trunk Jan 31, 2024
61 checks passed
@ramonjd ramonjd deleted the update/date-settings-script-compat-6.5 branch January 31, 2024 05:15
@github-actions github-actions bot added this to the Gutenberg 17.7 milestone Jan 31, 2024
@getdave getdave added the Needs PHP backport Needs PHP backport to Core label Jan 31, 2024
@getdave

This comment was marked as resolved.

@ramonjd
Copy link
Member Author

ramonjd commented Jan 31, 2024

Thanks @getdave

This PR doesn't need a backport. It's just a bit of cleaning up.

@afercia already has a patch for the 6.5 changes added to Gutenberg in #56682

See: https://core.trac.wordpress.org/ticket/60105

@ramonjd ramonjd removed the Needs PHP backport Needs PHP backport to Core label Jan 31, 2024
@getdave
Copy link
Contributor

getdave commented Feb 1, 2024

Thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check whether the 6.4 script-loader.php compat file should be removed in favor of the 6.5 one
3 participants