Skip to content

Commit

Permalink
Fix: Show the author and author name examples in the Stylebook (#69436)
Browse files Browse the repository at this point in the history
Co-authored-by: carolinan <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: im3dabasia <[email protected]>
  • Loading branch information
4 people authored Mar 5, 2025
1 parent 98622bf commit c6b1d9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/block-library/src/post-author-name/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ function PostAuthorNameEdit( {
</ToolsPanel>
</InspectorControls>
<div { ...blockProps }>
{ supportsAuthor
? displayAuthor
: sprintf(
{ ! supportsAuthor && postType !== undefined
? sprintf(
// translators: %s: Name of the post type e.g: "post".
__(
'This post type (%s) does not support the author.'
),
postType
) }
)
: displayAuthor }
</div>
</>
);
Expand Down
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 @@ -99,7 +99,7 @@ function PostAuthorEdit( {
const showAuthorControl =
!! postId && ! isDescendentOfQueryLoop && authorOptions.length > 0;

if ( ! supportsAuthor ) {
if ( ! supportsAuthor && postType !== undefined ) {
return (
<div { ...blockProps }>
{ sprintf(
Expand Down

1 comment on commit c6b1d9b

@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 c6b1d9b.
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/13677599972
📝 Reported issues:

Please sign in to comment.