PHP true or false -
i trying modify plugin called "events calendar" wordpress, show past events.
i have found function:
/** * returns true if query set past events, false otherwise * * @return bool */ function events_displaying_past() { global $spevents; return ($spevents->displaying == "past") ? true : false; }
iow can default true?
/** * returns true if query set past events, false otherwise * * @return bool */ function events_displaying_past() { global $spevents; return ($spevents->displaying == "past" || !isset($spevents->displaying)) ? true : false; }
Comments
Post a Comment