示例#1
0
        // Past, Present, Future class
        if ($current_day == $day) {
            $ppf = ' tec-present';
        } elseif ($current_day > $day) {
            $ppf = ' tec-past';
        } elseif ($current_day < $day) {
            $ppf = ' tec-future';
        }
    } elseif ($current_month > $month && $current_year == $year || $current_year > $year) {
        $ppf = ' tec-past';
    } elseif ($current_month < $month && $current_year == $year || $current_year < $year) {
        $ppf = ' tec-future';
    } else {
        $ppf = false;
    }
    echo "<td class='tec-thismonth" . $ppf . "'>" . display_day_title($day, $monthView) . "\n";
    echo display_day($day, $monthView);
    echo "</td>";
}
// skip next month
while ($day + $offset <= $rows * 7) {
    echo "<td class='tec-othermonth'></td>";
    $day++;
}
?>
		</tr>
	</tbody>
</table>
<?php 
/**
 * Each day in the calendar grid view will only display posts_per_page events.
        // Past, Present, Future class
        if ($current_day == $day) {
            $ppf = ' tribe-events-present';
        } elseif ($current_day > $day) {
            $ppf = ' tribe-events-past';
        } elseif ($current_day < $day) {
            $ppf = ' tribe-events-future';
        }
    } elseif ($current_month > $month && $current_year == $year || $current_year > $year) {
        $ppf = ' tribe-events-past';
    } elseif ($current_month < $month && $current_year == $year || $current_year < $year) {
        $ppf = ' tribe-events-future';
    } else {
        $ppf = false;
    }
    echo "<td class='tribe-events-thismonth" . $ppf . "'>" . display_day_title($day, $monthView, $date) . "\n";
    echo display_day($day, $monthView);
    echo "</td>";
}
// skip next month
while ($day + $offset <= $rows * 7) {
    echo "<td class='tribe-events-othermonth'></td>";
    $day++;
}
?>
		</tr>
	</tbody>
</table>
<?php 
function display_day_title($day, $monthView, $date)
{