Skip to content

Commit

Permalink
Update the placeholder for post excerpt (#40178)
Browse files Browse the repository at this point in the history
* Update the placeholder for post excerpt

* Update edit.js
  • Loading branch information
carolinan authored Apr 29, 2022
1 parent 15999a4 commit 3e6eb07
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/block-library/src/post-excerpt/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,20 @@ export default function PostExcerptEditor( {
return document.body.textContent || document.body.innerText || '';
}, [ renderedExcerpt ] );
if ( ! postType || ! postId ) {
return <div { ...blockProps }>{ __( 'Post Excerpt' ) }</div>;
return (
<div { ...blockProps }>
<p>
{ __(
'This is the Post Excerpt block, it will display the excerpt from single posts.'
) }
</p>
<p>
{ __(
'If there are any Custom Post Types with support for excerpts, the Post Excerpt block can display the excerpts of those entries as well.'
) }
</p>
</div>
);
}
if ( isProtected && ! userCanEdit ) {
return (
Expand Down

0 comments on commit 3e6eb07

Please sign in to comment.