<?php
defined('ABSPATH') or die();
if (!class_exists("cmplz_wsc_notices")) {
class cmplz_wsc_notices
{
public function init_hooks()
{
// If any hooks are needed for notices
add_filter('cmplz_field_notices', array($this, 'notices'));
add_filter('cmplz_warning_types', array($this, 'wsc_scan_add_warnings'));
}
/**
* Push some error messages if we find any
*
* @param array $notices
*
* @return array
*/
public function notices(array $notices): array
{
if (!cmplz_user_can_manage()) {
return $notices;
}
if (get_option('cmplz_wsc_error_email_mismatch')) {
$notices[] = [
'field_id' => cmplz_wsc::WSC_EMAIL_OPTION_KEY,
'label' => 'warning',
'title' => __("E-mail mismatch", 'complianz-gdpr'),
'text' => __("The e-mail that you are authenticating does not match the e-mail stored in your settings currently. Please clear the e-mail, save, then enter your e-mail address again.", 'complianz-gdpr'),
];
}
if (get_option('cmplz_wsc_error_missing_token')) {
$notices[] = [
'field_id' => cmplz_wsc::WSC_EMAIL_OPTION_KEY,
'label' => 'warning',
'title' => __("Missing token", 'complianz-gdpr'),
'text' => __("The token is missing from the URL which you are using to authenticate.", 'complianz-gdpr'),
'url' => 'https://complianz.io/authentication-failed',
];
}
if (get_option('cmplz_wsc_error_email_auth_failed')) {
$notices[] = [
'field_id' => cmplz_wsc::WSC_EMAIL_OPTION_KEY,
'label' => 'warning',
'title' => __("Authentication failed", 'complianz-gdpr'),
'text' => __("The authentication of your e-mail address failed. Please try again later.", 'complianz-gdpr'),
'url' => 'https://complianz.io/authentication-failed',
];
}
if (get_option('cmplz_wsc_error_token_api')) {
$notices[] = [
'field_id' => cmplz_wsc::WSC_EMAIL_OPTION_KEY,
'label' => 'warning',
'title' => __("Token not retrieved", 'complianz-gdpr'),
'text' => __("The token for the api could not be retrieved.", 'complianz-gdpr'),
'url' => 'https://complianz.io/authentication-failed',
];
}
if (get_option('cmplz_wsc_error_email_not_sent')) {
$notices[] = [
'field_id' => cmplz_wsc::WSC_EMAIL_OPTION_KEY,
'label' => 'warning',
'title' => __("E-mail verification not sent", 'complianz-gdpr'),
'text' => __("The e-mail to verify your e-mail address could not be sent. Please check your e-mail address or try again later.", 'complianz-gdpr'),
'url' => 'https://complianz.io/authentication-failed',
];
}
if (!cmplz_wsc_auth::wsc_is_authenticated()) {
$notices[] = [
'field_id' => cmplz_wsc::WSC_EMAIL_OPTION_KEY,
'label' => 'warning',
'title' => __("Try our new Website Scan!", 'complianz-gdpr'),
'text' => __("In the latest release of Complianz, we introduce our newest Website Scan. This scan will not only retrieve services and cookies but also help you configure our plugin and keep you up-to-date if changes are made that might need legal changes.", 'complianz-gdpr'),
'url' => 'https://complianz.io/about-the-website-scan'
];
}
if (!cmplz_wsc_auth::wsc_is_authenticated()) {
$notices[] = [
'field_id' => 'cookie_scan',
'label' => 'warning',
'title' => __("Try our new Website Scan!", 'complianz-gdpr'),
'text' => __("In the latest release of Complianz, we introduce our newest Website Scan. This scan will not only retrieve services and cookies but also help you configure our plugin and keep you up-to-date if changes are made that might need legal changes.", 'complianz-gdpr'),
'url' => '#settings/settings-cd',
];
}
if (get_option('cmplz_wsc_signup_status') === 'pending') {
$notices[] = [
'field_id' => cmplz_wsc::WSC_EMAIL_OPTION_KEY,
'label' => 'warning',
'title' => __("Check your email!", 'complianz-gdpr'),
'text' => __("Your authentication is still on pending, check your emails for a confirmation.", 'complianz-gdpr'),
'url' => 'https://complianz.io/about-the-website-scan#pending'
];
}
return $notices;
}
/**
* Add a warning that integrations changed.
*
* @param array $warnings
*
* @return array
*/
public function wsc_scan_add_warnings(array $warnings): array {
$wsc_checks_warnings = $this->retrieve_wsc_checks_warnings();
if ( is_array( $wsc_checks_warnings ) && count( $wsc_checks_warnings ) > 0 ) {
$warnings = array_merge( $warnings, $wsc_checks_warnings );
}
// if not authenticated.
if ( cmplz_wsc_auth::wsc_is_authenticated() ) {
return $warnings;
}
$warnings['wsc-scan'] = array(
'plus_one' => true,
'dismissible' => true,
'warning_condition' => '_true_',
'open' => __('You have a new feature! To enable the new and improved Website Scan you need to authenticate your website.', 'complianz-gdpr'),
'url' => '#settings/settings-cd',
);
return $warnings;
}
/**
* Retrieve warnings from the WSC checks.
*
* This method retrieves the warnings from the WSC checks by fetching the detections,
* checking if they match the notification blocks for the current Complianz version,
* and then creating an array of warnings based on these detections.
*
* @return array The array of warnings retrieved from the WSC checks.
*/
private function retrieve_wsc_checks_warnings(): array {
$warnings = array();
$detections = COMPLIANZ::$wsc_scanner->wsc_checks_retrieve_detections();
if ( is_array( $detections ) && count( $detections ) > 0 ) {
$blocks = COMPLIANZ::$wsc_scanner->wsc_checks_notification_blocks();
$cmplz_version = COMPLIANZ::$wsc_scanner->get_cmplz_version();
foreach ( $detections as $detection ) {
if ( isset( $blocks[ $detection['block'] ][ $cmplz_version ] ) ) {
$block = $blocks[ $detection['block'] ][ $cmplz_version ];
$warnings[ 'wsc-scan_' . $detection['block'] ] = array(
'plus_one' => false,
'dismissible' => true,
'warning_condition' => '_true_',
$block['type'] => COMPLIANZ::$wsc_scanner->wsc_checks_notification_generate_block_description( $block, $detection, true ),
'url' => $block['read_more'],
);
}
}
}
return $warnings;
}
}
}
في عام 2017، أصدر الكاتب المصري أحمد مراد روايته “موسم صيد الغزلان”، التي جاءت خارج المألوف في السرد العربي، واصطحبت القارئ في رحلة إلى مستقبل تحكمه التكنولوجيا، وتختفي فيه ملامح الحياة التقليدية. رواية استباقية طرحت أسئلة علمية وفلسفية بلغة أدبية مشوقة، وتنبأت بواقع نبدأ اليوم في ملامسته.
في الرواية، نتتبع رحلة “نديم”، أستاذ بيولوجيا شاب يؤمن بالعلم المطلق وينكر الأديان، يلتقي بـ”تُقى”، فتاة تنتمي إلى جماعة سرّية ما زالت تؤمن بالروحانيات والإيمان. ينطلق الصراع بين العقل والإيمان في قالب حواري وفلسفي داخل عالم مستقبلي متطور تقنيًا، تُستخدم فيه تقنيات زرع الذاكرة، والعلاج بالروبوت، والتعليم بالنقل العصبي. وبين أسئلة الإيمان، والحب، والمعرفة، يكشف مراد عالماً يُخضع الإنسان للآلة ويطرح تساؤلات وجودية عميقة عن المستقبل ومعنى الحياة.
مراد لم يكتب من فراغ، بل بنى روايته على بحث علمي مكثف. وقال مراد في أحد تصريحاته:
“الرواية استغرقت مني 3 أشهر من البحث العلمي، و9 أشهر من الكتابة. التحدي الأكبر كان أن أستشرف المستقبل من خلال الإشارات العلمية المتوفرة الآن.”
ما كتبه أحمد مراد عن أدوات الاتصال الذكية، التعليم القائم على زراعة المعرفة في الدماغ، والطب القادر على استبدال أعضاء الإنسان بالكامل، لم يعد ضرباً من الخيال. فالواقع الافتراضي والمعزز، والهولوجرام، والروبوتات الجراحية، وواجهات زرع المعلومات في الدماغ مثل Neuralink، كلها تقنيات بدأت تظهر في حياتنا المعاصرة. حتى التقدم في مجالات تعديل الأجنة وزراعة الأعضاء الصناعية الذكية أصبح اليوم محط نقاش وتجربة.
ورغم سيطرة الخط التكنولوجي، لم تغب الكوارث البيئية عن الرواية. فقد أشار مراد إلى جفاف نهر النيل، وغرق مناطق الدلتا والإسكندرية بسبب ذوبان الجليد القطبي. وهي مشاهد روائية تنسجم بشكل مقلق مع التحذيرات العلمية الراهنة من آثار تغيّر المناخ على المدن الساحلية.
رواية أم سيناريو مستقبلي؟
تميّزت الرواية بأسلوب بصري واضح، فبدت مشاهدها وكأنها تُعرض على شاشة سينمائية. استخدم مراد تقنيات السرد البصري بشكل بارع، فبدت الابتكارات وكأنها شخصيات موازية داخل الحبكة، وليست مجرد خلفية.
خيال علمي عربي… يسبق عصره
“موسم صيد الغزلان” ليست فقط عملاً روائيًا متقدّمًا، بل خطوة جريئة في مجال الخيال العلمي العربي، الذي نادرًا ما يتم التعامل معه بجديّة. مراد لم يستخدم الخيال كمهرب من الواقع، بل كأداة لقراءته وتحليله واستشراف ما قد يأتي.
ومع تسارع وتيرة التطور التكنولوجي اليوم، تعود الرواية لتُقرأ من منظور مختلف: كنص أدبي استشرافي، سبق زمنه، ولامس ملامح واقع نعيش بداياته