/** * Replaces the event page with the FullCalendar if requested in settings * @param unknown_type $page_content * @return Ambigous <mixed, string> */ function wpfc_em_content($content = '', $page_content = '') { global $wpdb, $post; if (em_is_events_page()) { $calendar_content = WP_FullCalendar::calendar(); //Now, we either replace CONTENTS or just replace the whole page if (preg_match('/CONTENTS/', $page_content)) { $content = str_replace('CONTENTS', $calendar_content, $page_content); } else { $content = $calendar_content; } } return $content; }
/** * If this is a page is a multiple events page * @return boolean */ function em_is_multiple_events_page() { //FIXME this will also show true if it's not a locations page return em_is_events_page() && !em_is_single_event_page(); }
function em_is_multiple_events_page() { em_is_events_page(); }