Esempio n. 1
0
function displayAllShowTimes($dataAsArray)
{
    for ($i = 0; $i < count($dataAsArray); $i++) {
        $showTime = new WPMT_Session();
        $showTime->assign_values($dataAsArray, $i);
        echo "<div class='wpmt_session_title'>" . $showTime->title . "</div>";
        echo "<div class='wpmt_session_body'>";
        displayShowTime($showTime);
        echo "</div>";
    }
}
function wpmt_add_sessions($session_data)
{
    $session_data_as_array = wpmt_object_to_array($session_data);
    $session = new WPMT_Session();
    for ($i = 0; $i < count($session_data_as_array); $i++) {
        $session->assign_values($session_data_as_array, $i);
        $post_id = wpmt_add_post($session->title, 'wpmt_session');
        $session->update_fields($post_id);
    }
}