/** * Callback function for scheduled event * * @return None **/ function tap_hourly_update() { if (get_option("tap_add_news_to_db")) { tap_get_news($add_news_to_db = TRUE); } }
$usernames = get_option("tap_usernames"); $exceptions = get_option("tap_exceptions"); $category = get_option("tap_category"); $user = get_option("tap_user"); $consumer_key = get_option("tap_consumer_key"); $consumer_sec = get_option("tap_consumer_sec"); $access_token = get_option("tap_access_token"); $access_secret = get_option("tap_access_secret"); // Add news as post? if (get_option("tap_add_news_to_db")) { $add_news_to_db = "checked"; } } // Process $_POST for form id="tap_get_news_form" if ($_POST["tap_get_news_hidden"] == "Y" && get_option("tap_add_news_to_db")) { $retval = tap_get_news(TRUE); $flash_success = $retval . " Tweet(s) added as Posts"; } // If tap_add_news_to_db == TRUE get the last 10 log entries ?> <?php if (!$flash_success == "") { ?> <div class="updated"> <p><?php _e($flash_success); ?> </p> </div> <?php