$refresh, 'display' => 'Plugin Downloads Schedule'); return $recc; } /* This is the scheduling hook for our plugin that is triggered by cron */ add_action('dprx_pldl_hook','dprx_pldl_trigger_schedule'); function dprx_pldl_trigger_schedule() { dprx_pldl_parser(); } /* Schedules are activated and deactivated */ add_action('init', 'dprx_pldl_setoptions'); function dprx_pldl_setoptions() { if (!empty($_POST['dprx_pldl_wporguser'])) { update_option("dprx_pldl_wporguser",$_POST['dprx_pldl_wporguser']); if (!empty($_POST['dprx_pldl_refresh'])) { $timestamp = wp_next_scheduled('dprx_pldl_hook', array()); /* This is where the event gets unscheduled */ wp_unschedule_event($timestamp, "dprx_pldl_hook", array()); update_option("dprx_pldl_refresh",$_POST['dprx_pldl_refresh']); $refresh = get_option("dprx_pldl_refresh"); $refresh = $refresh*3600; /* This is where the actual recurring event is scheduled */ if (!wp_next_scheduled('dprx_pldl_hook', array())) { wp_schedule_event(time()+$refresh, "dprx_pldl_recc", "dprx_pldl_hook", array()); } } dprx_pldl_parser(); } } function dprx_pldl_update_button() { ?>
" onclick="
document.getElementById('dprx_plugindownloadsdiv').innerHTML='/wp-content/plugins/backupwordpress/images/loading.gif /> ';
new Ajax.Updater(
'dprx_plugindownloadsdiv',
'/wp-admin/index.php?page=',
{method: 'get',
parameters:'dprx_pldldo_ajax=1'}
);" />
| &sort=title&sortorder="> | &sort=updated&sortorder="> | &sort=downloads&sortorder="> | |
|---|---|---|---|
"; print_r($final); echo ""; */ } add_action('init', 'dprx_pldl_do',99); function dprx_pldl_do() { if (!empty($_GET['dprx_pldldo_ajax'])) { dprx_pldl_parser(); dprx_pldl_display_cache(); exit; } } function dprx_pldl_manage_page() { ?>
.