Skip to content

Add has-dates class to Latest Posts block if applicable#10727

Merged
danielbachhuber merged 1 commit into
masterfrom
update/10691-latest-posts-has-dates
Oct 23, 2018
Merged

Add has-dates class to Latest Posts block if applicable#10727
danielbachhuber merged 1 commit into
masterfrom
update/10691-latest-posts-has-dates

Conversation

@swissspidy

Copy link
Copy Markdown
Member

Description

This changes the Latest Posts block to add a has-dates class when the Display post date option is set. The class is added both in the editor and on the front end.

How has this been tested?

Tested this using the local Docker environment by adding a Latest Posts block and toggling that option.

Screenshots

Editor:

screenshot 2018-10-18 at 12 11 35

Front end:

screenshot 2018-10-18 at 12 11 44

Types of changes

This adds a new has-dates class, as is already the case with the "Latest Comments" block.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

Fixes #10691.

@ocean90 ocean90 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This would make it consistent with the Latest Comments block.

Comment thread packages/block-library/src/latest-posts/index.php
@danielbachhuber danielbachhuber added this to the 4.2 milestone Oct 23, 2018
@danielbachhuber danielbachhuber added [Feature] Blocks Overall functionality of blocks [Feature] Extensibility The ability to extend blocks or the editing experience labels Oct 23, 2018
@danielbachhuber danielbachhuber merged commit 75acaa1 into master Oct 23, 2018
@danielbachhuber danielbachhuber deleted the update/10691-latest-posts-has-dates branch October 23, 2018 20:07
antpb pushed a commit to antpb/gutenberg that referenced this pull request Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Blocks Overall functionality of blocks [Feature] Extensibility The ability to extend blocks or the editing experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants