[wp-trac] [WordPress Trac] #54829: Allow classic themes to be optionally block themes if 'templates' and 'parts' folders exists
WordPress Trac
noreply at wordpress.org
Sun Jan 16 10:25:11 UTC 2022
#54829: Allow classic themes to be optionally block themes if 'templates' and
'parts' folders exists
----------------------------------------------------+---------------------
Reporter: exstheme | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.0
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs-testing | Focuses:
----------------------------------------------------+---------------------
Comment (by exstheme):
Hello, dear @costdev !
Thank you very much for this commit:
https://github.com/WordPress/wordpress-
develop/pull/2175/commits/daeade936c57fb00824be4c954cf2bbd2ee2f75b
It is exactly what we're looking for:
1. Now even if file '`templates/index.html`' exists we're able to disable
'block theme' functionality with this filter:
{{{add_filter( 'is_block_theme', '__return_false' );}}}
2. Now the only source of truth to check if theme is a block theme is this
method:
{{{wp_get_theme()->is_block_theme()}}}
which is great!
So now if user wants to just check new FSE feature it can just check the
appropriate settings checkbox. And if he decide to switch back - he can
uncheck this setting.
Dear @poena !
I guess that adding ability to easily convert classic theme to a block
theme and back is a good opportunity to let users to check and experiment
with the new FSE feature with their theme of choice. And if anything will
be broken they can always switch back without changing their theme.
And for theme's authors it is a great ability to update their existing
themes without creating, supporting and maintaining new ones.
Hope this make sense for you.
Many thanks to everyone once again for your quick actions!
Best regards!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54829#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list