-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add block bindings for copyright date and privacy policy link #7
Comments
I'd love to see this. I'd say the one downside of the Privacy Policy is that you'll get an empty |
Perhaps the paragraph could contain something more than the link, like the site title? Let's start with the copyright info. |
I think the empty p could be solved by using the empty css selector, something like this: .site-footer p:empty { display: none; } |
@carolinan @justintadlock I would create a block variation for the policy link. This variation can be addressed within a |
@carstingaxion - Yep, that's a solution that I've employed in similar situations. Just not sure if that's something OK to go in a default theme or not, but I'll leave that up to folks to decide. |
Let's at least do the copyright. Would be a good use case others can learn from as well (and easy as it doesn't rely on conditionals). |
Part of it is choosing what the bound text should be, in the editor :) |
I would also recommend adding a separate pattern or block variation for the copyright section, utilizing block bindings properties. This would allow users to easily insert the copyright element wherever needed. |
What
Add a block binding for a dynamic copyright date.
Add a block binding for a link to the privacy policy page. This link should only display if the privacy policy page is published.
Why
The purpose of this task is twofold: To solve two common problems and showcase how to use the block bindings api.
Resources
https://make.wordpress.org/core/2024/03/06/new-feature-the-block-bindings-api/
https://developer.wordpress.org/news/2024/02/20/introducing-block-bindings-part-1-connecting-custom-fields/
https://developer.wordpress.org/news/2024/03/06/introducing-block-bindings-part-2-working-with-custom-binding-sources/
https://developer.wordpress.org/news/2024/05/06/building-a-book-review-site-with-block-bindings-part-1-custom-fields-and-block-variations/
https://developer.wordpress.org/news/2024/06/06/building-a-book-review-site-with-block-bindings-part-2-queries-patterns-and-templates/
The text was updated successfully, but these errors were encountered: