";
echo "
Hit an External Cron Settings
";
echo '';
}
/* Fill the Menu page with content */
function jorbin_cron_init(){
register_setting( 'jorbin_cron_options', 'jorbin_cron_options', 'jorbin_cron_options_validate' );
add_settings_section('the_jorbin_cron', '', 'jorbin_cron_details_text', 'cron');
add_settings_field('jorbin_cron_field', 'URL', 'jorbin_cron_field_display', 'cron', 'the_jorbin_cron');
}
add_action('admin_init', 'jorbin_cron_init');
function jorbin_cron_field_display(){
$options = get_option('jorbin_cron_options');
echo "";
}
function jorbin_cron_details_text(){
echo "Enter the URL you need to hit once a day
";
}
function jorbin_cron_options_validate($input){
$newinput['url'] = esc_url_raw( trim( $input['url'] ) );
return $newinput;
}
/* The Guts of the plugin
* Where the cron actually happens
*/
function jorbin_cron(){
$options = get_option('jorbin_cron_options');
$url = $options['url'];
$request = new WP_Http;
$result = $request->request( $url );
}
add_action('jorbin_daily_event', 'jorbin_cron');
?>