All-in-One Event Calendar
Show events with equal start/stop time without time span in the (5 posts)

  1. anxhu
    Posted 4 years ago #


    in case calender entries do not have an end_time, e.g. the end_time ist the same as the start_time, the following code extension will improve the agenda view of the calendar, such that the time will not be written like
    9:00 - 9:00
    but just
    which is fine for an entry with open or unspecified end.

    If the end_date is different from the start_date but the start/end_time is equal, nothing will be changed.

    If it's fine for you feel free to add it to the official code.

    # /wp-content/plugins/all-in-one-event-calendar
    > diff app/view/agenda.php app/view/agenda.php.orig
    < <?php echo esc_html( $event->start_time ) ?>
    < <?php if( ($event->start_time != $event->end_time) || ($event->short_end_date != $event->short_start_date) ): ?>
    < <?php echo esc_html(' – ' . $event->end_time ) ?>
    < <?php endif ?></span>
    > <?php echo esc_html( $event->start_time . ' – ' . $event->end_time ) ?></span>


  2. nelra
    Posted 4 years ago #

    Thank you for taking the time to submit a patch

  3. tobi1kanoby
    Posted 4 years ago #

    Thank You anxhu
    would you please be kind and guide me as to where to place this patch?

  4. anxhu
    Posted 4 years ago #

    Hi Tobi,

    > find . -name agenda.php

    Just replace code line 69 (shown by diff prefix: >) with the code indicated by the diff prefix <.

    You'll see the effect in the agenda view. All other views will not show a time span of zero time, i.e. "10:30 - 10:30". I wonder if this tiny patch will be included it into the official code. There have been an update meanwhile already.

  5. tobi1kanoby
    Posted 4 years ago #

    Thanks a lot my friend
    I have tested it on the current version and you are right, there is no need to include the patch anymore.
    Works great.
    Thanks again

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • All-in-One Event Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic