wp plugin udapted v1.5.0
This commit is contained in:
@@ -13,18 +13,13 @@ if (!defined('ABSPATH')) {
|
||||
// Get current settings
|
||||
$email = get_option('igny8_email', '');
|
||||
$site_id = get_option('igny8_site_id', '');
|
||||
$integration_id = get_option('igny8_integration_id', '');
|
||||
$access_token = function_exists('igny8_get_secure_option') ? igny8_get_secure_option('igny8_access_token') : get_option('igny8_access_token');
|
||||
$last_structure_sync = get_option('igny8_last_structure_sync', 0);
|
||||
// Connection is complete only if: API key exists, integration_id exists, and structure has been synced
|
||||
$is_connected = !empty($access_token) && !empty($integration_id) && !empty($last_structure_sync);
|
||||
$api_key = function_exists('igny8_get_secure_option') ? igny8_get_secure_option('igny8_api_key') : get_option('igny8_api_key');
|
||||
$is_connected = !empty($api_key);
|
||||
$date_format = get_option('date_format');
|
||||
$time_format = get_option('time_format');
|
||||
$now = current_time('timestamp');
|
||||
$token_issued = intval(get_option('igny8_access_token_issued', 0));
|
||||
$token_age_text = $token_issued ? sprintf(__('%s ago', 'igny8-bridge'), human_time_diff($token_issued, $now)) : __('Not generated yet', 'igny8-bridge');
|
||||
$token_issued_formatted = $token_issued ? date_i18n($date_format . ' ' . $time_format, $token_issued) : __('—', 'igny8-bridge');
|
||||
$last_communication = intval(get_option('igny8_last_communication', 0));
|
||||
$last_communication_text = $last_communication ? sprintf(__('%s ago', 'igny8-bridge'), human_time_diff($last_communication, $now)) : __('Never', 'igny8-bridge');
|
||||
$last_health_check = intval(get_option('igny8_last_api_health_check', 0));
|
||||
$last_health_check_formatted = $last_health_check ? date_i18n($date_format . ' ' . $time_format, $last_health_check) : __('Never', 'igny8-bridge');
|
||||
$last_site_sync = intval(get_option('igny8_last_site_sync', 0));
|
||||
|
||||
Reference in New Issue
Block a user