WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. anxhu
    Member
    Posted 2 years ago #

    Hi,

    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
    9:00
    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
    69,72c69
    < <?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>

    http://wordpress.org/extend/plugins/all-in-one-event-calendar/

  2. nelra
    Member
    Posted 2 years ago #

    Thank you for taking the time to submit a patch

  3. tobi1kanoby
    Member
    Posted 2 years ago #

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

  4. anxhu
    Member
    Posted 2 years ago #

    Hi Tobi,

    > find . -name agenda.php
    ./wp-content/plugins/all-in-one-event-calendar/app/view/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
    Member
    Posted 2 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
    Tobi

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic