Skip to content

Commit

Permalink
Block Library: Standardize post block placeholders. (#23690)
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras authored Jul 7, 2020
1 parent 066d839 commit 2305a40
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/post-author/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function PostAuthorEdit( { isSelected, context, attributes, setAttributes } ) {
/>
) }
<p className="wp-block-post-author__name">
{ authorDetails?.name }
{ authorDetails?.name || 'Post Author' }
</p>
{ showBio && (
<p className="wp-block-post-author__bio">
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-comments-count/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function PostCommentsCountDisplay( { className } ) {

export default function PostCommentsCountEdit( { className } ) {
if ( ! useEntityId( 'postType', 'post' ) ) {
return 'Post Comments Count Placeholder';
return 'Post Comments Count';
}
return <PostCommentsCountDisplay className={ className } />;
}
2 changes: 1 addition & 1 deletion packages/block-library/src/post-comments-form/edit.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function PostCommentsFormEdit() {
return 'Post Comments Form Placeholder';
return 'Post Comments Form';
}
2 changes: 1 addition & 1 deletion packages/block-library/src/post-comments/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function PostCommentsEdit() {
// TODO: Update to handle multiple post types.
const postId = useEntityId( 'postType', 'post' );
if ( ! postId ) {
return 'Post Comments Placeholder';
return 'Post Comments';
}
return <PostCommentsDisplay postId={ postId } />;
}
2 changes: 1 addition & 1 deletion packages/block-library/src/post-excerpt/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default function PostExcerptEdit( {
isSelected,
} ) {
if ( ! useEntityId( 'postType', 'post' ) ) {
return 'Post Excerpt Placeholder';
return 'Post Excerpt';
}
return (
<PostExcerptEditor
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-featured-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function PostFeaturedImageDisplay() {

export default function PostFeaturedImageEdit() {
if ( ! useEntityId( 'postType', 'post' ) ) {
return 'Post Featured Image Placeholder';
return 'Post Featured Image';
}
return <PostFeaturedImageDisplay />;
}
2 changes: 1 addition & 1 deletion packages/block-library/src/post-tags/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function PostTagsDisplay() {

export default function PostTagsEdit() {
if ( ! useEntityId( 'postType', 'post' ) ) {
return 'Post Tags Placeholder';
return 'Post Tags';
}
return <PostTagsDisplay />;
}
2 changes: 1 addition & 1 deletion packages/block-library/src/post-title/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function PostTitleEdit( {
[ `has-text-align-${ align }` ]: align,
} ) }
>
{ post.title }
{ post.title || 'Post Title' }
</Block>
</>
);
Expand Down

0 comments on commit 2305a40

Please sign in to comment.