示例#1
0
function ikit_task_hourly_event_run()
{
    ikit_national_remote_fetch();
    ikit_event_etouches_remote_fetch();
    ikit_job_remote_fetch();
    ikit_social_remote_fetch_designenvy_rss();
    ikit_social_remote_fetch_eyeondesign_rss();
    ikit_social_remote_fetch_twitter_messages_rss();
    ikit_social_remote_fetch_vimeo_videos_rss();
    ikit_social_remote_fetch_flickr_images_rss();
    ikit_social_remote_fetch_facebook_feed();
    ikit_social_remote_fetch_youtube_videos_rss();
    ikit_social_remote_fetch_instagram_feed();
}
function ikit_menu_control_panel_process_request()
{
    // Handle form submission
    $action = null;
    if (isset($_POST['action'])) {
        $action = $_POST['action'];
    }
    // Pull etouches events
    if ($action == 'force_pull_etouches_events') {
        ikit_event_etouches_remote_fetch();
    }
    // Pull Eventbrite events
    if ($action == 'force_pull_eventbrite_events') {
        try {
            ikit_event_eventbrite_remote_fetch();
        } catch (Exception $e) {
            // Display admin error if problem fetching
            global $g_admin_notices;
            array_push($g_admin_notices, '<div class="error">Error during force pull Eventbrite events: ' . $e->getMessage() . '</div>');
        }
    }
    // Delete etouches events
    if ($action == 'force_purge_etouches_events') {
        ikit_delete_ikit_events(IKIT_EVENT_SERVICE_ETOUCHES);
    }
    // Delete Eventbrite events
    if ($action == 'force_purge_eventbrite_events') {
        ikit_delete_ikit_events(IKIT_EVENT_SERVICE_EVENTBRITE);
    }
    // Delete all jobs
    if ($action == 'force_purge_jobs') {
        ikit_delete_ikit_jobs();
    }
    // Delete all portfolios
    if ($action == 'force_purge_portfolios') {
        ikit_delete_ikit_portfolios();
    }
}