Skip to content
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

Subscriptions: use new Plugin Template Registration API for WP_Block_Template #39923

Closed
jeherve opened this issue Oct 28, 2024 · 1 comment
Closed
Labels
[Closed] Duplicate Duplicate of an existing issue. [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Comments

@jeherve
Copy link
Member

jeherve commented Oct 28, 2024

Since the introduction of block themes, theme authors have been able to create custom block templates. However, this possibility was limited to themes, leaving plugins without a straightforward way to register their own templates. To achieve similar functionality, plugins had to resort to complex methods, including hooking into multiple PHP filters, manually creating WP_Block_Template objects, and replicating internal WordPress logic.

WordPress 6.7 introduces a new API that will significantly simplify the process for plugins to register their own block templates. To enable this, two new functions have been introduced: register_block_template() for registering a block template and unregister_block_template() for unregistering it.

Dev note: https://make.wordpress.org/core/2024/10/20/new-plugin-template-registration-api-in-wordpress-6-7/

@jeherve jeherve changed the title Subscriptions: use new Plugin Template Registration API for WP_Block_Template ([dev note](https://make.wordpress.org/core/2024/10/20/new-plugin-template-registration-api-in-wordpress-6-7/)) Subscriptions: use new Plugin Template Registration API for WP_Block_Template Oct 28, 2024
@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Pri] Normal [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Oct 28, 2024
@jeherve
Copy link
Member Author

jeherve commented Oct 28, 2024

Closing as duplicate of #39853

@jeherve jeherve closed this as completed Oct 28, 2024
@jeherve jeherve added the [Closed] Duplicate Duplicate of an existing issue. label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Closed] Duplicate Duplicate of an existing issue. [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

No branches or pull requests

1 participant