Closed cliffordp closed 7 years ago
Can you please give the use case for this?
(As it stands, this will break backwards-compatibility.)
If this is my template:
/wp-admin/plugins/tk-event-weather/includes/templates/hourly_horizontal.php
the unique part of the action hook is simply hourly_horizontal
--> get_template_part_hourly_horizontal
What if another plugin uses your class and has the same template name?
A workaround could be to name the templates with a prefix, like
/wp-admin/plugins/tk-event-weather/includes/templates/tk_event_weather_hourly_horizontal.php
/wp-admin/plugins/tk-event-weather/includes/templates/tk_event_weather_hourly_vertical.php
/wp-admin/plugins/tk-event-weather/includes/templates/tk_event_weather_low_high.php
But that doesn't feel right.
Let me know if any additional clarification is needed.
Thanks!
Closing in favour of #25.
Example: action hook is now
get_template_part_tk_event_weather_hourly_horizontal
instead of justget_template_part_hourly_horizontal