60, 'display' => 'Every Minute' ); return $schedules; } static function cron_active( $activate = null ) { if ( $activate === null ) return (bool)wp_next_scheduled( self::$hook ); if ( $activate ) { if ( !wp_next_scheduled( self::$hook ) ) wp_schedule_event( time(), self::$sched, self::$hook ); } else { wp_clear_scheduled_hook( self::$hook ); } return (bool)$activate; } static function admin_menu() { add_submenu_page( 'tools.php', 'Cron test', 'Cron Test', 'manage_options', 'cron_test_page', array( __CLASS__, 'page_cron_test' ) ); } static function page_cron_test() { global $title; if ( !empty( $_REQUEST['noheader'] ) && !empty( $_REQUEST['action'] ) ) { switch ($_REQUEST['action'] ) { case 'toggle_cron': $current_cron = self::cron_active(); $new_cron = self::cron_active( !$current_cron ); $msg = $new_cron ? 'Enabled' : 'Disabled'; wp_redirect( add_query_arg( 'msg', $msg, admin_url( 'tools.php?page=' . $_REQUEST['page'] ) ) ); break; } } ?>

' . $_REQUEST['msg'] . '

'; ?>
Hook Status %s', $url, $label ); ?>
Last Run
Last Run From Action
Next Run