WordPress.org

Ready to get started?Download WordPress

Forums

Simple Events Calendar
[resolved] "Where:" label and event links displaying when empty (4 posts)

  1. Set Sail Media
    Member
    Posted 1 year ago #

    In this bug, when the Location field is left empty, the "Where:" line is still shown on the front-end. The same bug applies to a scenario where the "More Information" link is shown, even when the Event URL is left empty.

    This problem applies to the if and elseif statements on lines 785, 787, 795, and specifically to your use of isset()

    By comparing with isset(), it's always returning true, because the field IS set (just null). You need to include a second comparison after ensuring the field isset, to make sure the field is not blank (even though the variable is set).

    if(isset($event['event_url'])) { ... } else...

    Just check to make sure it's not empty:

    if(isset($event['event_url']) && $event['event_url'] != '' ) {...

    This example shows from line 795 but the same case applies above on 785 & 787 for location ("Where")

    http://wordpress.org/extend/plugins/simple-events-calendar/

  2. tizoast
    Member
    Posted 1 year ago #

    Thank you!

  3. Jerry G. Rietveld
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for your feedback! This will be sorted in the next update!

    Cheers,
    Jerry

  4. f0u
    Member
    Posted 1 year ago #

    +1

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.