grrr-amsterdam / wordpress-scaffold

The scaffold for GRRR's WordPress Pro setup.
MIT License
18 stars 3 forks source link

Add possibility to add default value for snippet #40

Closed HammenWS closed 4 years ago

HammenWS commented 4 years ago

@schoenkaft Maybe it would be nice to have a default value for a snippet, without having to resave the snippets options page. I wonder what you think about this solution.

schoenkaft commented 4 years ago

Hmm. Not sure yet. At first glance I quite dislike this, I think. You would be adding actual content in your templates, right? Feels a bit like the Polylang translation defaults.

This might not play out well with i18n, although the same issue applies to ACF field defaults to some degree. And with longer snippets (like a paragraph), templates get polluted easily.

Personally I don't use snippets that much, since I usually find ways to include them in templates, so maybe it's not that of an issue in practice. Although this feature is probably needed since you've added quite a lot of snippets, meaning there would be quite a few 'defaults' in templates.

Let me thinker on it a bit more. Not saying no, but not totally fond of the idea either 😄

HammenWS commented 4 years ago

After trying it out. Im confident it is a bad idea.