function bfox_bp_plans_save_schedule(BfoxReadingSchedule $schedule)
{
    $schedule->frequency((int) $_POST['schedule-frequency']);
    $schedule->days_of_week(implode('', (array) $_POST['schedule-days']));
    $schedule->set_start_date($_POST['schedule-start']);
    $schedule->set_label(strip_tags(stripslashes($_POST['schedule-label'])));
    $schedule->note = strip_tags(stripslashes($_POST['schedule-note']), '<a><b><em><i><strong>');
    if (isset($_POST['schedule-owner'])) {
        if (empty($_POST['schedule-owner'])) {
            $schedule->set_user_owner();
        } else {
            list($owner_type, $owner_id) = explode('-', $_POST['schedule-owner'], 2);
            $schedule->set_owner($owner_type, $owner_id);
        }
    }
    $schedule->save();
}