diff --git a/metatag.post_update.php b/metatag.post_update.php index 5b3dfce..47ad122 100644 --- a/metatag.post_update.php +++ b/metatag.post_update.php @@ -184,3 +184,42 @@ function metatag_post_update_convert_author_data(&$sandbox) { return (string) t("There were no overridden Metatag records."); } } + +/** + * Remove Google Plus tags from defaults. + */ +function metatag_post_update_remove_googleplus1() { + // @todo Finish this. + $entityTypeManager = \Drupal::entityTypeManager(); + $metaTagDefaultsStorage = $entityTypeManager->getStorage('metatag_defaults'); + $metaTagDefaults = $metaTagDefaultsStorage->loadMultiple(); + $batchSize = 20; + + /** @var \Drupal\metatag\MetatagTagPluginManager $tagPluginManager */ + $tagPluginManager = \Drupal::service('plugin.manager.metatag.tag'); + $pluginDefinitions = $tagPluginManager->getDefinitions(); +} + +/** + * Remove Google Plus tags from entity values. + */ +function metatag_post_update_remove_googleplus2(&$sandbox) { + // @todo Write this. +} + +/** + * Uninstall the Metatag: Google Plus module. + */ +function metatag_post_update_remove_googleplus3() { + $moduleHandler = \Drupal::moduleHandler(); + + if (!$moduleHandler->moduleExists('metatag_google_plus')) { + return (string) t("Metatag: Google Plus is not enabled, nothing to do."); + } + + /** @var \Drupal\Core\Extension\ModuleInstallerInterface $moduleInstaller */ + $moduleInstaller = \Drupal::service('module_installer'); + $moduleInstaller->uninstall(['metatag_google_plus']); + + return (string) t("Metatag: Google Plus has been uninstalled."); +} diff --git a/metatag_google_plus/config/schema/metatag_google_plus.metatag_tag.schema.yml b/metatag_google_plus/config/schema/metatag_google_plus.metatag_tag.schema.yml deleted file mode 100644 index 8defd7c..0000000 --- a/metatag_google_plus/config/schema/metatag_google_plus.metatag_tag.schema.yml +++ /dev/null @@ -1,19 +0,0 @@ -# The 'type' should be "label" for short meta tags and "text" for ones which -# could get longer, especially ones which use a textarea field instead of a -# textfield. - -metatag.metatag_tag.google_plus_name: - type: label - label: 'Google Plus: name' -metatag.metatag_tag.google_plus_image: - type: label - label: 'Google Plus: image' -metatag.metatag_tag.google_plus_description: - type: text - label: 'Google Plus: description' -metatag.metatag_tag.google_plus_publisher: - type: label - label: 'Publisher URL' -metatag.metatag_tag.google_plus_author: - type: label - label: 'Author' diff --git a/metatag_google_plus/metatag_google_plus.info.yml b/metatag_google_plus/metatag_google_plus.info.yml deleted file mode 100644 index fc6b2ae..0000000 --- a/metatag_google_plus/metatag_google_plus.info.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: 'Metatag: Google Plus' -type: module -description: Provides support for Google's Plus meta tags. Deprecated, will be removed in Metatag 2.0.0. -core_version_requirement: '^9.3 || ^10' -package: SEO -dependencies: - - metatag:metatag diff --git a/metatag_google_plus/src/Plugin/metatag/Group/GooglePlus.php b/metatag_google_plus/src/Plugin/metatag/Group/GooglePlus.php deleted file mode 100644 index 2726a9e..0000000 --- a/metatag_google_plus/src/Plugin/metatag/Group/GooglePlus.php +++ /dev/null @@ -1,23 +0,0 @@ -Google Plus.", arguments = { ":plus" = "https://plus.google.com/" }), - * weight = 4 - * ) - * - * @deprecated in metatag:8.x-1.22 and is removed from metatag:2.0.0. No replacement is provided. - * - * @see https://www.drupal.org/project/metatag/issues/3065441 - */ -class GooglePlus extends GroupBase { - // Inherits everything from Base. -} diff --git a/metatag_google_plus/src/Plugin/metatag/Tag/Author.php b/metatag_google_plus/src/Plugin/metatag/Tag/Author.php deleted file mode 100644 index 4fb9b6c..0000000 --- a/metatag_google_plus/src/Plugin/metatag/Tag/Author.php +++ /dev/null @@ -1,28 +0,0 @@ -