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

Unify theme block placeholder content #35517

Merged
merged 3 commits into from Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/block-library/src/post-content/edit.js
Expand Up @@ -85,7 +85,7 @@ function Placeholder() {
const blockProps = useBlockProps();
return (
<div { ...blockProps }>
<p>{ __( 'This is a placeholder for post content.' ) }</p>
<p>{ __( 'Post Content' ) }</p>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-date/edit.js
Expand Up @@ -72,7 +72,7 @@ export default function PostDateEdit( {
{ dateI18n( resolvedFormat, date ) }
</time>
) : (
__( 'No Date' )
__( 'Post Date' )
);
if ( isLink && date ) {
postDate = (
Expand Down
4 changes: 1 addition & 3 deletions packages/block-library/src/post-excerpt/edit.js
Expand Up @@ -59,9 +59,7 @@ export default function PostExcerptEditor( {
if ( ! postType || ! postId ) {
return (
<div { ...blockProps }>
<Warning>
{ __( 'Post excerpt block: no post found.' ) }
</Warning>
<Warning>{ __( 'Post Excerpt' ) }</Warning>
</div>
);
}
Expand Down
16 changes: 2 additions & 14 deletions packages/block-library/src/post-terms/edit.js
Expand Up @@ -52,20 +52,8 @@ export default function PostTermsEdit( {
} ),
} );

if ( ! hasPost ) {
return (
<div { ...blockProps }>
{ __( 'Post Terms block: post not found.' ) }
</div>
);
}

if ( ! term ) {
return (
<div { ...blockProps }>
{ __( 'Post Terms block: no term specified.' ) }
</div>
);
if ( ! hasPost || ! term ) {
return <div { ...blockProps }>{ __( 'Post Terms' ) }</div>;
}

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-title/edit.js
Expand Up @@ -46,7 +46,7 @@ export default function PostTitleEdit( {
} );

let titleElement = (
<TagName { ...blockProps }>{ __( 'An example title' ) }</TagName>
<TagName { ...blockProps }>{ __( 'Post Title' ) }</TagName>
);

if ( postType && postId ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/term-description/edit.js
Expand Up @@ -37,7 +37,7 @@ export default function TermDescriptionEdit( {
</BlockControls>
<div { ...blockProps }>
<div className="wp-block-term-description__placeholder">
<span>{ __( 'Term description.' ) }</span>
<span>{ __( 'Term Description' ) }</span>
</div>
</div>
</>
Expand Down