Skip to content

Commit

Permalink
Post excerpt: add text alignment to the placeholder (#45003)
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinan authored Jan 30, 2023
1 parent 6e16d73 commit 2354bd9
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions packages/block-library/src/post-excerpt/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,28 @@ export default function PostExcerptEditor( {
}, [ renderedExcerpt ] );
if ( ! postType || ! postId ) {
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>
<>
<BlockControls>
<AlignmentToolbar
value={ textAlign }
onChange={ ( newAlign ) =>
setAttributes( { textAlign: newAlign } )
}
/>
</BlockControls>
<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 ) {
Expand Down

1 comment on commit 2354bd9

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in 2354bd9.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4043055698
📝 Reported issues:

Please sign in to comment.