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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -