-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Plugin: Fix eligibility check for post types' default rendering mode #67879
Conversation
@@ -32,15 +32,18 @@ function gutenberg_post_type_rendering_modes() { | |||
* @return array Updated array of post type arguments. | |||
*/ | |||
function gutenberg_post_type_default_rendering_mode( $args, $post_type ) { | |||
$rendering_mode = 'page' === $post_type ? 'template-locked' : 'post-only'; | |||
$rendering_modes = gutenberg_post_type_rendering_modes(); | |||
if ( ! wp_is_block_theme() || ! current_theme_supports( 'block-templates' ) ) { |
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.
This is a rare case, but technically doable.
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @CreativeDive. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
Flaky tests detected in cbeea5f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12298386191
|
If there are no objections, I'm going to merge this :) |
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.
Good catch! :)
What?
Fixes #67875.
PR fixes checks for adding a new
default_rendering_mode
to the post-type object, ensuring that the current theme supportsblock-template
.Testing Instructions
block-template
support for block theme.Snippet
Testing Instructions for Keyboard
Same.