function dpProEventCalendar_getEventsMonthList() { $nonce = $_POST['postEventsNonce']; //if ( ! wp_verify_nonce( $nonce, 'ajax-get-events-nonce' ) ) // die ( 'Busted!'); if (!is_numeric($_POST['month'])) { die; } $month = $_POST['month']; $year = $_POST['year']; $calendar = $_POST['calendar']; $category = $_POST['category']; $event_id = $_POST['event_id']; $author = $_POST['author']; require_once 'classes/base.class.php'; $dpProEventCalendar = new DpProEventCalendar(false, $calendar, null, null, '', $category, $event_id, $author); $next_month_days = cal_days_in_month(CAL_GREGORIAN, str_pad($month, 2, "0", STR_PAD_LEFT), $year); $month_number = str_pad($month, 2, "0", STR_PAD_LEFT); echo $dpProEventCalendar->eventsMonthList($year . "-" . $month_number . "-01 00:00:00", $year . "-" . $month_number . "-" . $next_month_days . " 23:59:59"); die; }