I am trying to modify a plugin called the "events calendar" for wordpress, to show past events.
I have found this function:
/**
* Returns true if the query is set for past events, false otherwise
*
* @return bool
*/
function events_displaying_past() {
global $spEvents;
return开发者_Python百科 ($spEvents->displaying == "past") ? true : false;
}
Iow can I default this to true?
/**
* Returns true if the query is set for past events, false otherwise
*
* @return bool
*/
function events_displaying_past() {
global $spEvents;
return ($spEvents->displaying == "past" || !isset($spEvents->displaying)) ? true : false;
}
精彩评论