• Resolved Set Sail Media

    (@setsailmedia)


    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/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘"Where:" label and event links displaying when empty’ is closed to new replies.