我正在使用这个名为 showtime 的插件。我喜欢它,但有一个问题,我想调用当天的日程安排。该插件的某些部分要求使用简码来获取所有日期和那些日子的日程安排。
我在下面的代码中添加了什么以确保它获得当天的时间表。
function showtime_schedule_handler($atts, $content=null, $code=""){
global $wpdb;
global $showtimeTable;
//Get the current schedule, divided into days
$daysOfTheWeek = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
$schedule = array();
$output = '';
foreach ($daysOfTheWeek as $day) {
//Add this day's shows HTML to the $output array
$showsForThisDay = $wpdb->get_results( $wpdb->prepare ( "SELECT * FROM $showtimeTable WHERE dayOfTheWeek = '$day' ORDER BY startTime" ));