-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix: Show the author and author name examples in the Stylebook #69436
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +9 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @carolinan!
Co-authored-by: carolinan <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: im3dabasia <[email protected]>
I just cherry-picked this PR to the wp/6.8 branch to get it included in the next release: f4039e8 |
What?
The title of this PR is a bit misguiding because the code change is unrelated to the Stylebook.
But the expected result is for the post author and post author name blocks to show in the Stylebook.
Closes #68513
Why?
#67136 Added a bug fix to the two blocks, which meant that if the post type did not support the post author, there would be a notice displayed in the editor to inform the user.
This also lead to the notice showing when the post type is
undefined
. And the post type isundefined
when you view the Stylebook.There are exceptions where the post type is not undefined, and that is when editing a template for the single post or single page, and then opening the stylebook from within the Site Editor. But in these cases, the blocks already show their examples correctly.
I have made this code change based on the following:
Testing Instructions
With any theme type: Confirm that there are no regressions when inserting a post author block when editing content, either post, page, or custom post type.
Classic theme:
Activate a classic theme that has support for the stylebook. For example, Twenty Fifteen.
Open Appearance > Design > Styles and look for the author and author name blocks.
Confirm if the block shows with a basic example and not a message saying that the block is unsupported.
Block theme:
Activate a block theme, and test the stylebook in two places:
In the Site Editor, when editing different type of templates. -Open the Styles sidebar and open the Stylebook.
Look for the author and author name blocks.
Confirm if the block shows with a basic example and not a message saying that the block is unsupported.
Open the first screen of the Site Editor and choose Styles in the sidebar.
Open the Stylebook.
Open the blocks panel.
Look for the author and author name blocks.
Confirm if the block shows with a basic example and not a message saying that the block is unsupported.
Screenshots or screencast