From 22d97ac0cc61f96dd77d3716652a8616cec9d02a Mon Sep 17 00:00:00 2001 From: Bharath Kondeti Date: Sun, 4 Jun 2023 23:08:28 +0530 Subject: [PATCH] Added d10 compatablity. --- corporate_lite.info.yml | 2 +- corporate_lite.theme | 4 ++-- theme-settings.php | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/corporate_lite.info.yml b/corporate_lite.info.yml index 88eb694..917758f 100644 --- a/corporate_lite.info.yml +++ b/corporate_lite.info.yml @@ -3,7 +3,7 @@ type: theme base theme: classy description: 'The free version of Corporate+ Drupal 8 theme' core: 8.x -core_version_requirement: ^8 || ^9 +core_version_requirement: ^8 || ^9 || ^10 libraries: - corporate_lite/fontawesome - corporate_lite/global-styling diff --git a/corporate_lite.theme b/corporate_lite.theme index 850a555..ebd04b3 100644 --- a/corporate_lite.theme +++ b/corporate_lite.theme @@ -703,11 +703,11 @@ function corporate_lite_preprocess_node__article(&$variables) { // Count the words of article in order to calculate the reading time $node_content = $variables['content']; - $node_content = render($node_content); + $node_content = \Drupal::service('renderer')->render($node_content); $words = str_word_count(strip_tags($node_content)); if (isset($variables['content']['comment'])) { $node_comments = $variables['content']['comment']; - $node_comments = render($node_comments); + $node_comments = \Drupal::service('renderer')->render($node_comments); $words = $words - str_word_count(strip_tags($node_comments)); } $variables['minutes'] = floor($words / 275); diff --git a/theme-settings.php b/theme-settings.php index 10c16be..d0d5192 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -151,7 +151,7 @@ function corporate_lite_form_system_theme_settings_alter(&$form, &$form_state) { '
'.t("Available in the Premium version of this theme").'
- +
', ); @@ -169,7 +169,7 @@ function corporate_lite_form_system_theme_settings_alter(&$form, &$form_state) { '
'.t("Available in the Premium version of this theme").'
- +
', ); @@ -187,7 +187,7 @@ function corporate_lite_form_system_theme_settings_alter(&$form, &$form_state) { '
'.t("Available in the Premium version of this theme").'
- +
', ); @@ -205,7 +205,7 @@ function corporate_lite_form_system_theme_settings_alter(&$form, &$form_state) { '
'.t("Available in the Premium version of this theme").'
- +
', ); @@ -223,7 +223,7 @@ function corporate_lite_form_system_theme_settings_alter(&$form, &$form_state) { '
'.t("Available in the Premium version of this theme").'
- +
', ); @@ -241,7 +241,7 @@ function corporate_lite_form_system_theme_settings_alter(&$form, &$form_state) { '
'.t("Available in the Premium version of this theme").'
- +
', ); @@ -259,7 +259,7 @@ function corporate_lite_form_system_theme_settings_alter(&$form, &$form_state) { '
'.t("Available in the Premium version of this theme").'
- +
', ); @@ -277,7 +277,7 @@ function corporate_lite_form_system_theme_settings_alter(&$form, &$form_state) { '
'.t("Available in the Premium version of this theme").'
- +
', ); -- GitLab