Jetpack_Heartbeat::__construct PHP Method

__construct() private method

Constructor for singleton
Since: 2.3.3
private __construct ( ) : Jetpack_Heartbeat
return Jetpack_Heartbeat
    private function __construct()
    {
        if (!Jetpack::is_active()) {
            return;
        }
        // Schedule the task
        add_action($this->cron_name, array($this, 'cron_exec'));
        if (!wp_next_scheduled($this->cron_name)) {
            // Deal with the old pre-3.0 weekly one.
            if ($timestamp = wp_next_scheduled('jetpack_heartbeat')) {
                wp_unschedule_event($timestamp, 'jetpack_heartbeat');
            }
            wp_schedule_event(time(), 'daily', $this->cron_name);
        }
        add_filter('jetpack_xmlrpc_methods', array(__CLASS__, 'jetpack_xmlrpc_methods'));
    }