Open iandunn opened 3 years ago
Popping in here merely to say that I am working on a theme and I really wish this capability existed already.
Hey, @iandunn 👋🏻 I would like to contribute to this issue. Are there any latest updates so far?
Not that I'm aware of. The Gutenberg team needs to decide if it's something they want to implement, and what the architecture should look like.
As a theme author this would be a huge help as our users are mostly confused and frustrated with templates and would be great to be able to lock them in some situations
I would like to chime in that this would be extremely beneficial to me as well. Having the ability to lock these parts from being moved, removed, or edited in any way by anyone but a super admin would be perfect. I manage a multisite network of over a thousand sites with authors everywhere on the spectrum of skills. We have a standard banner and styles across all of the sites that we have to lock down given our self-publishing set up. I am currently developing a new theme to update our platform. Please take a serious look at this. Thank you.
+1! I am building a Saas based on themes and FSE and need to limit what can be customized by the client.
template parts could have an inline attribute, so they can be locked in some cases and not in others.
This is already works
<!-- wp:template-part {"slug":"header","area":"header","tagName":"header","lock":{"move":true,"remove":true}} /-->
What problem does this address?
Theme authors will want to lock entire FSE templates and template parts in some situations.
There are some related issues, but I wasn't able to find any for that specific purpose:
What is your proposed solution?
theme.json
could have an attribute for making a template or part always be locked:template parts could have an inline attribute, so they can be locked in some cases and not in others.
Eventually, more granularity could be added, like
"locked": [ "move", "delete" ]
, buttrue/false
would be a good start.