-
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
Post terms: Add prefix & suffix #40559
Post terms: Add prefix & suffix #40559
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @dsas! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
Add prefix and suffix attributes to the post-terms block. These attributes are displayed inside the block div, immediately before and after the list. The attributes can be edited as rich text inside the block editor. Fixes #29909
Editing the placeholders works well in my test, the toolbar options also work and the text displays as expected on the front. Are these terms, prefix and suffix, common enough to be understood by most users? In my opinion, to allow theme developers to style the prefix and suffix, the markup in the editor and front needs to match and the class names |
If the prefix or suffix attributes are provided, wrap them in spans with a classname. See #40559
@carolinan thanks for the review, I've made the span change as suggested. I think 'prefix' and 'suffix' are common enough, but as a native English speaking developer, perhaps I'm not the best person to answer! I don't think there is a simple alternative to 'prefix' and 'suffix' that's as recognisable. Perhaps 'preface' rather than prefix, but I'm not sure that's much clearer really. I'll continue to think about it, but if anyone has any suggestions, they're very welcome. |
If the prefix or suffix attributes are provided, wrap them in spans with a classname. See #40559
Hi, @amustaque97 What method are you using to merge merging the PRs? Commits from this branch merged into It's not a big deal, I just wanted to check if this was an issue on the GitHub side. |
Hi @Mamaduka 👋 , yeah I choose the other option without squashing them into one. I have noticed this behaviour for others, I can see it working correctly but in my case it somehow makes a single commit while merge. Next time, I will record my screen and then probably we can discuss. |
@amustaque97, it's supposed to make a single commit on merge. So I would recommend always using the "Squash and merge" option. |
What?
Allowing an optional prefix and suffix to be added to the Post Categories and Post Tags
Why?
A common pattern in themes is to display categories and tags prepended with a text. This is the case for all default themes, including TwentyTwentyOne.
Fixes #29909
How?
Testing Instructions
Screenshots or screencast
Screen.Capture.on.2022-04-22.at.21-22-18.mp4