feat(Core): add optimize and complete code

This commit is contained in:
2026-05-17 20:05:15 +03:30
parent aa944bf339
commit 4e60b7efdd
25 changed files with 858 additions and 54 deletions

View File

@@ -112,6 +112,12 @@ class BannerService {
wp_cache_set('version', $version, 'sodino_banners');
}
return 'sodino_active_banners_' . md5($version . '|' . $position . '|' . serialize($context));
$runtimeContext = [
'user' => is_user_logged_in() ? 'returning' : 'new',
'device' => wp_is_mobile() ? 'mobile' : 'desktop',
'minute' => gmdate('YmdHi', current_time('timestamp', true)),
];
return 'sodino_active_banners_' . md5($version . '|' . $position . '|' . wp_json_encode($context) . '|' . wp_json_encode($runtimeContext));
}
}