/** * Get class instance * * @since 1.3.5 * * @return \Caldera_Forms_Support */ public static function get_instance() { if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }
* @package Caldera_Forms * @author Josh Pollock <*****@*****.**> * @license GPL-2.0+ * @link * @copyright 2016 CalderaWP LLC */ ?> <div class="caldera-config-group" id="caldera-config-group-short"> <h3><?php esc_html_e('Short Debug Information', 'caldera-form'); ?> </h3> <?php echo Caldera_Forms_Support::short_debug_info(); ?> </div> <div class="caldera-config-group" id="caldera-config-group-full"> <h3><?php esc_html_e('Full Debug Information', 'caldera-form'); ?> </h3> <?php echo Caldera_Forms_Support::debug_info(); ?> </div>
/** * Send tracking rows if allowed * * @since 1.3.5 */ public static function send_rows() { if (false == self::tracking_allowed()) { return; } $last_row = self::get_last_sent_row(); include_once CFCORE_PATH . 'classes/db/track.php'; $highest = Caldera_Forms_Track::get_instance()->highest_id(); if ($highest <= $last_row) { return; } $partial = false; if ($highest - $last_row > 1000) { $partial = true; $highest = $last_row - $highest; } $rows = self::prepare_rows_to_send($last_row, $highest); $body = array('url' => urlencode(home_url()), 'rows' => $rows, 'plugins' => Caldera_Forms_Support::get_plugins()); $sent = self::send_to_api(self::$api_url . '/tracking', 'POST', $body); if (!is_numeric($sent)) { end($rows); $key = key($rows); update_option(self::$row_tracking_key, intval($rows[$key])); } if ($partial) { wp_schedule_single_event(time() + 59, 'caldera_forms_tracking_send_rows'); } }