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

Block Library: Add a Post Date block. #19578

Merged
merged 3 commits into from
Jan 14, 2020
Merged

Block Library: Add a Post Date block. #19578

merged 3 commits into from
Jan 14, 2020

Conversation

epiqueras
Copy link
Contributor

Description

This PR adds a new Post Date block akin to the Post Title and Post Content blocks.

How has this been tested?

  • Inserted Post Date block in a post.
  • Confirmed post date rendered in the editor and front end.
  • Inserted Post Date block in a template.
  • Confirmed post date placeholder rendered in the editor and the relevant post date rendered in the front end.

Types of Changes

New Feature: There is a new Post Date block for template building.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

packages/block-library/src/post-date/edit.js Outdated Show resolved Hide resolved
packages/block-library/src/post-date/index.php Outdated Show resolved Hide resolved

export const settings = {
title: __( 'Post Date' ),
edit,
Copy link
Contributor

Choose a reason for hiding this comment

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

a format attribute is definitely needed for this block.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

Looks good for a start

@epiqueras epiqueras force-pushed the add/post-date-block branch from 8630677 to 31bfb51 Compare January 14, 2020 17:52
@epiqueras epiqueras requested review from nerrad and ntwb as code owners January 14, 2020 17:52
@epiqueras epiqueras merged commit eeb13f4 into master Jan 14, 2020
@epiqueras epiqueras deleted the add/post-date-block branch January 14, 2020 19:14
@ellatrix ellatrix modified the milestones: Future, Gutenberg 7.3 Jan 20, 2020
@kjellr kjellr added the New Block Suggestion for a new block label Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Block Suggestion for a new block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants