Discussion: Should Theme Export include plugin provided templates #47580
Replies: 4 comments 1 reply
-
My feeling is that if even a single plugin-provided template has been modified, then all templates provided by that plugin should be supplied in the export. So for example, if the single product template from WooCommerce is edited then presumably the theme is meant to support WooCommerce so all WooCommerce template files, e.g. basket page, checkout page, etc..., should be included in the export even if those ones haven't been changed. |
Beta Was this translation helpful? Give feedback.
-
My instinct is not only that it should be the plugin's responsibility to answer this question for its own case, but that it would be mostly futile for core to "mandate" it one way or another, since it probably would not be too hard for the plugin to "spoof" its templates as coming from the theme and thus get around the "mandate." There is currently not one official way for plugins to provide templates and each plugin may do it in a different way. |
Beta Was this translation helpful? Give feedback.
-
@DaisyOlsen Maybe we should convert this issue into a discussion? How could we move forward with this discussion? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the ping, @DaisyOlsen! My initial instinct is that only templates that have been modified by the user should be included in a theme export. If all plugin templates are included, then these templates are immediately out of date with the plugin that provided them. There is also no guarantee that the exported theme will be used with the plugin in question, and in that case, there would be no need to include them. If the templates have not been modified, then themes should fall back to plugin-specific templates provided by the active plugins. |
Beta Was this translation helpful? Give feedback.
-
I've discovered that when a plugin that provides templates that are compatible with a block theme (SenseiLMS, WooCommerce, LifterLMS confirmed) are present and a theme is exported from site editor the plugin provided templates are included in the downloaded theme.
I'd like to encourage a discussion regarding whether or not all plugin provided templates should be included in the export or only those that have been modified in the site editor.
My reason for bringing this up relates to the possibility that there could be a risk of templates becoming invalid or increase confusion if a theme is created and subsequently installed on a site when no actual modifications have been made to those plugin provided templates.
Beta Was this translation helpful? Give feedback.
All reactions