-
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
WIP - Hybrid themes implementation #29298
Conversation
Size Change: +53 B (0%) Total Size: 1.41 MB
ℹ️ View Unchanged
|
if ( ! templates.length ) { | ||
return { | ||
id: 'index', | ||
content: { | ||
raw: '', | ||
}, | ||
slug: 'index', | ||
is_custom: false, | ||
type: 'wp_template', | ||
status: 'publish', | ||
wp_id: null, | ||
}; | ||
} | ||
|
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 part allows the creation of a new template from the dashboard. If the theme doesn't have any templates, there's nothing to fallback to and the site-editor throws errors which prevents the user from creating a template.
This is a simple tweak to allow falling back to something - even if that something is an empty string.
@@ -102,7 +102,7 @@ function gutenberg_menu() { | |||
* @since 9.4.0 | |||
*/ | |||
function gutenberg_site_editor_menu() { | |||
if ( gutenberg_is_fse_theme() ) { | |||
if ( gutenberg_is_fse_enabled() ) { |
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.
Allow showing the site-editor if the user has opted-in, or we're in an FSE theme.
Closing this one. it's too far behind and we already merged #29026 which contained a simpler iteration |
Description
This is an experiment to see if and how we can have hybrid themes. See discussion on #29024
To test, enable a non-FSE theme, then go from the dashboard to Gutenberg > Experiments and enable the FSE experiment. The option only shows when the active theme is not an FSE theme.