PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.14.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.14.0
2.14.1 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 All 56 releases
← All changes | includes/seo/class-schema-management-system.php +2 -22 2.14.1 → 2.14.0 View file →
@@ -730,27 +730,8 @@
730 730 return $optimization;
731 731 }
732 732
733 733 /**
734 - * Deployed types an authoritative deploy takes off the page.
735 - *
736 - * Everything deployed that the payload left out, except the types the
737 - * caller sent but could not deploy: those failed validation, they were not
738 - * removed by the user, so their live copy stays. Retiring them took the
739 - * site's Organization down behind a success toast (#949).
740 - *
741 - * @since 2.14.1
742 - *
743 - * @param string[] $deployed Types deployed for the context now.
744 - * @param string[] $payload Types in this deploy.
745 - * @param string[] $retain_types Types sent but skipped by validation.
746 - * @return string[] Types to retire.
747 - */
748 - public static function types_to_retire(array $deployed, array $payload, array $retain_types = []): array {
749 - return array_values(array_diff($deployed, $payload, $retain_types));
750 - }
751 -
752 - /**
753 734 * Deploy schema markup with automated implementation
754 735 *
755 736 * @since 1.0.0
756 737 *
@@ -784,12 +765,11 @@
784 765 if (!empty($options['authoritative'])) {
785 766 $deployment['retired_schemas'] = $this->retire_schema_types(
786 767 $context_type,
787 768 $context_id,
788 - self::types_to_retire(
769 + array_diff(
789 770 array_keys($this->get_deployed_schemas($context_type, $context_id)),
790 - array_keys($schema_data),
791 - (array) ($options['retain_types'] ?? [])
771 + array_keys($schema_data)
792 772 )
793 773 );
794 774 }
795 775