diff --git a/eu_cookie_compliance.module b/eu_cookie_compliance.module index 58a74b0..12ef70c 100644 --- a/eu_cookie_compliance.module +++ b/eu_cookie_compliance.module @@ -175,10 +175,14 @@ function eu_cookie_compliance_page_attachments(&$attachments) { $popup_text_info = str_replace(["\r", "\n"], '', $config->get('popup_info.value')); $popup_text_agreed = str_replace(["\r", "\n"], '', $config->get('popup_agreed.value')); $withdraw_markup = str_replace(["\r", "\n"], '', $config->get('withdraw_message.value')); + + // @NOTE: disagree_button is a legacy variable name renamed + // to more_info_button, keeped it to avoid problems in customs templates. $html_info = [ '#theme' => 'eu_cookie_compliance_popup_info', '#message' => check_markup($popup_text_info, $config->get('popup_info.format'), FALSE), '#agree_button' => $primary_button_label, + '#disagree_button' => ($config->get('show_more_info') == TRUE) ? $config->get('popup_more_info_button_message') : FALSE, '#more_info_button' => ($config->get('show_more_info') == TRUE) ? $config->get('popup_more_info_button_message') : FALSE, '#secondary_button_label' => $secondary_button_label, '#primary_button_class' => $primary_button_class, @@ -189,6 +193,7 @@ function eu_cookie_compliance_page_attachments(&$attachments) { '#theme' => 'eu_cookie_compliance_popup_info', '#message' => check_markup($mobile_popup_text_info, $config->get('popup_info.format'), FALSE), '#agree_button' => $primary_button_label, + '#disagree_button' => ($config->get('show_more_info') == TRUE) ? $config->get('popup_more_info_button_message') : FALSE, '#more_info_button' => ($config->get('show_more_info') == TRUE) ? $config->get('popup_more_info_button_message') : FALSE, '#secondary_button_label' => $secondary_button_label, '#primary_button_class' => $primary_button_class, @@ -352,6 +357,7 @@ function eu_cookie_compliance_theme($existing, $type, $theme, $path) { 'variables' => [ 'message' => NULL, 'agree_button' => NULL, + 'disagree_button' => NULL, 'more_info_button' => NULL, 'secondary_button_label' => NULL, 'primary_button_class' => NULL,