I would add this though… with the caveat that you may have to experiment a bit.
The Pro version includes additional templates, and in order to do that, I made the core plugin support external templates. It won’t automatically swap in localized versions by placing identically named template files in your theme, but with a bit of extra code you can create your own uniquely named templates and put them wherever you want in your theme.
This hinges mostly on the r34ics_display_calendar_render_template
action. It accepts 3 input parameters: $view
, $args
, and $ics_data
. In order these are a string with your view name (must match view
from the shortcode), an array of all of the arguments in the shortcode, and an array of the parsed calendar data ready to be manipulated by the view.
Inside your add_action()
function you’ll need use an include()
or locate_template()
or similar to retrieve your custom template. You’ll also probably want to use one of the existing templates as a starting point.
Unfortunately this is not the whole story. There are several spots within the R34ICS::display_calendar()
method where there you’ll find switch (@$view) { }
and each of these has some special view-specific handling for setting certain values. They all have a default
case with additional hooks. In many cases, you can use those hooks and just copy the code from one of the cases for the built-in views. But key elements of the logic won’t be set without these, and your view won’t display properly as a result.
Anyway… maybe this will help you to experiment a bit. Ultimately I do plan to add more structured support for custom templates and localization… it’s just not there yet.