From 02ff351642c65dd14ef0a697af11ec475debc207 Mon Sep 17 00:00:00 2001 From: Tyler Stryuk <tstryuk@uwaterloo.ca> Date: Thu, 9 Feb 2023 15:03:24 -0500 Subject: [PATCH] ISTWCMS-6047: Doing min amount for D10 --- uw_fdsu_theme_resp.info.yml | 2 +- uw_fdsu_theme_resp.theme | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/uw_fdsu_theme_resp.info.yml b/uw_fdsu_theme_resp.info.yml index a3fc36b2..95ffbc9f 100644 --- a/uw_fdsu_theme_resp.info.yml +++ b/uw_fdsu_theme_resp.info.yml @@ -2,7 +2,7 @@ name: UW FDSU responsive theme type: theme description: Theme based on <a href="https://github.com/chazchumley/ohana">Ohana</a>. base theme: seven -core_version_requirement: ^8 || ^9 +core_version_requirement: ^8 || ^9 || ^10 dependencies: - content_moderation:content_moderation - uw_wcms_ohana:uw_wcms_ohana diff --git a/uw_fdsu_theme_resp.theme b/uw_fdsu_theme_resp.theme index 659bf07e..94ad7daa 100644 --- a/uw_fdsu_theme_resp.theme +++ b/uw_fdsu_theme_resp.theme @@ -304,7 +304,7 @@ function _uw_fdsu_theme_resp_add_favicons(array &$variables) { // Specify new favicon locations. // Based on https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs. - $favicon_base_path = base_path() . drupal_get_path('theme', 'uw_fdsu_theme_resp'); + $favicon_base_path = base_path() . \Drupal::service('extension.list.theme')->getPath('uw_fdsu_theme_resp'); $favicon = [ 'rel' => 'icon', 'href' => $favicon_base_path . '/favicon.ico', @@ -432,7 +432,7 @@ function _uw_fdsu_theme_resp_get_image_info(FileFieldItemList $field) { if ($file_entity = $img_entity->get('entity')->getTarget()) { return [ - 'src' => file_create_url($file_entity->get('uri')->getString()), + 'src' => \Drupal::service('file_url_generator')->generateAbsoluteString($file_entity->get('uri')->getString()), 'alt' => $img_entity->get('alt')->getString(), ]; } -- GitLab