Add 'event-occurance' event list template tag

WordPress Event Management, Calendars & Registration Forums Request A Feature Add 'event-occurance' event list template tag

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 7 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24437

    I’d like to propose a %event-occurance% shortcode template tag for Events List. This tag outputs the event start and end dates intelligently using the eo_format_event_occurance function, as an alternative to using the %start% and %end% tags (e.g. October 2-4 2016).

    This can be done by modifying classes/class-event-organizer-shortcodes.php:

    1. add a new ‘event_occurance’ pattern to the array in function read_template:

      ‘/%(event_occurance)({([^{}])}{([^{}])}|{[^{}]*})?%/’,

    2. add a new ‘event_occurance’: case to the first switch in function parse_template that handles the arguments for start, end, etc.

    3. add a new ‘event_occurance’ case to the inner switch that processes the tags: case ‘event_occurance’:

      $replacement = eo_format_event_occurrence( false, false, $dateFormat, $dateTime, ‘ – ‘, false ); break;

    Note that I chose not to include microdata in order to match what’s done with start, end, etc. Perhaps all of these should have microdata?

    ICG EventOrganizer-Admin
    #24538

    I’ve opened a GitHub issue to track this feature here: https://github.com/stephenharris/Event-Organiser/issues/385

    (It will probably be called event_range rather than event_occurrence)

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.