Closed drewbaker closed 2 months ago
@drewbaker Plugin provides default templates and users can override it in theme. As you might know plugins like WooCommerce and PaidMembershipPro provides default templates with the plugin and that's why I implemented in the same way.
Oh, OK, good idea!
Please check https://github.com/drewbaker/wp-easy-plugin/blob/main/includes/class-utils.php#L333-L345 As you can see, it checks in below order.
/wp-easy
directory/wp-easy/
directory/templates/
directorySo in a theme, you'd have this:
/wp-easy/components/
/wp-easy/templates/
/wp-easy/scripts/
/wp-easy/styles/
/wp-easy/layouts/
I think I'd prefer to not have them inside /wp-easy/
.
@drewbaker Currently components and layouts are implemented in the way already. I'll move templates to the subdirectory
Ideally the plugin is just the functionality and supporting code.
A theme should still contain the templates, components, CSS, JS and route definitions.