Plugin: Fix eligibility check for post types' default rendering mode#67879
Conversation
| 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.
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 :) |
…ordPress#67879) * Plugin: Fix eligibility check for post types' default rendering mode * Add backport changelog entry Unlinked contributors: CreativeDive. Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
…ordPress#67879) * Plugin: Fix eligibility check for post types' default rendering mode * Add backport changelog entry Unlinked contributors: CreativeDive. Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
What?
Fixes #67875.
PR fixes checks for adding a new
default_rendering_modeto the post-type object, ensuring that the current theme supportsblock-template.Testing Instructions
block-templatesupport for block theme.Snippet
Testing Instructions for Keyboard
Same.