diff --git a/composer.json b/composer.json index f13d1c5..981eaa2 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,6 @@ } ], "require": { - "drupal/core": "^8.8 || ^9.0" + "drupal/core": "^8.8 || ^9.0 || ^10" } } diff --git a/share_everywhere.info.yml b/share_everywhere.info.yml index 13cdffd..905ab1e 100644 --- a/share_everywhere.info.yml +++ b/share_everywhere.info.yml @@ -2,7 +2,7 @@ name: Share Everywhere type: module description: 'Drupal social share module.' package: Custom -core_version_requirement: ^8.8 || ^9 +core_version_requirement: ^8.8 || ^9 || ^10 configure: share_everywhere.config_form dependencies: - drupal:path_alias diff --git a/src/ShareEverywhereService.php b/src/ShareEverywhereService.php index 85f517f..e306154 100755 --- a/src/ShareEverywhereService.php +++ b/src/ShareEverywhereService.php @@ -46,7 +46,7 @@ class ShareEverywhereService implements ShareEverywhereServiceInterface { public function build($url, $id) { global $base_url; $config = $this->configFactory->get('share_everywhere.settings'); - $module_path = drupal_get_path('module', 'share_everywhere'); + $module_path = \Drupal::service('extension.list.module')->getPath('share_everywhere'); $build = ['#theme' => 'share_everywhere']; $buttons = []; $library = [];