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

RSS: Correctly output 'datetime' string #47027

Merged
merged 1 commit into from
Jan 10, 2023
Merged

Conversation

Mamaduka
Copy link
Member

What?

Fixes #47000.

PR fixes the datetime output for the RSS block.

Why?

The date_i18n requires the correct format string, but the get_option( 'c' ) doesn't exist and returns false, preventing the date output.

How?

I've updated to code, and now the format is passed directly.

Testing Instructions

  1. Open a Post or Page.
  2. Insert an RSS Block.
  3. Set feed URL. Example - https://make.wordpress.org/core
  4. Toggle "Display date" from the settings.
  5. Confirm that the datetime attribute is correctly set. It's easier to check this by DevTools Inspector.

Screenshots or screencast

Before
CleanShot 2023-01-10 at 16 55 41

After
CleanShot 2023-01-10 at 16 56 07

@Mamaduka Mamaduka requested review from Soean and removed request for ajitbohra January 10, 2023 13:03
@Mamaduka Mamaduka self-assigned this Jan 10, 2023
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Block] RSS Affects the RSS Block - used to display entries from an RSS/Atom feed labels Jan 10, 2023
Copy link
Member

@Soean Soean left a comment

Choose a reason for hiding this comment

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

Oh, that's been wrong for quite a long time. Thanks for the fix!

@github-actions
Copy link

Flaky tests detected in 66359fc.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3883583547
📝 Reported issues:

@Mamaduka Mamaduka merged commit 7a17f01 into trunk Jan 10, 2023
@Mamaduka Mamaduka deleted the fix/rss-datetime-string branch January 10, 2023 14:16
@github-actions github-actions bot added this to the Gutenberg 15.0 milestone Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] RSS Affects the RSS Block - used to display entries from an RSS/Atom feed [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in core/rss date
2 participants