GaryJones / Gamajo-Template-Loader

A class to copy into your WordPress plugin, to allow loading template parts with fallback through the child theme > parent theme > plugin.
GNU General Public License v2.0
292 stars 61 forks source link

Suggest installing and using Mozart via composer.json #35

Closed coenjacobs closed 6 years ago

coenjacobs commented 6 years ago

This suggests using the coenjacobs/mozart package to automatically rewrite the class to use a prefix in order to prevent collisions with other plugins bundling the same class but in a different (non-compatible) version.

We've implemented it this way in our base plugin: https://github.com/Mindsize/wp-plugin-base/pull/2 using this exact class (which is great btw, thank you!).

I've written a bunch of posts and documentation on this subject to further investigate before your merge, if you prefer:

GaryJones commented 6 years ago

@coenjacobs Thanks!

As an aside, I'm wondering if TGMPA may also benefit from this suggestion - we occasionally get Issues being opened to say that TGMPA is being used in both a plugin and a theme (or multiple plugins) that someone is using and is causing a conflict, and our response has always been to get the user (or we do it ourselves) to ask the theme and plugin authors to ensure they are using the latest version. If you think Mozart would be useful there (I've not looked att he finer details of it yet), then please open a ticket on the TGMPA repo, and @jrfnl and myself can discuss it further.