PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.13.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.13.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 1.26.0 1.25.0 All 54 releases
← All changes | includes/frontend/class-seo-manager.php +21 -3 2.10.0 → 2.13.0 View file →
@@ -1799,12 +1799,16 @@
1799 1799 // Get image dimensions and alt text
1800 1800 $image_id = get_post_thumbnail_id($this->current_post_id);
1801 1801 $image_meta = wp_get_attachment_metadata($image_id);
1802 1802 if ($image_meta) {
1803 + // The `large` file being published, not the original it
1804 + // was generated from: the metadata's own width and height
1805 + // describe an image this tag does not point at (#847).
1806 + $image_file = \ThinkRank\SEO\Attachment_Lookup::describe((int) $image_id, (string) $image_url);
1803 1807 // SVGs (and other vector uploads) report 0x0 — emitting
1804 1808 // those as og:image dimensions is invalid, so skip them.
1805 - $og_width = isset($image_meta['width']) ? (int) $image_meta['width'] : 0;
1806 - $og_height = isset($image_meta['height']) ? (int) $image_meta['height'] : 0;
1809 + $og_width = $image_file['width'];
1810 + $og_height = $image_file['height'];
1807 1811 if ($og_width > 0 && $og_height > 0) {
1808 1812 echo "<meta property=\"og:image:width\" content=\"" . esc_attr($og_width) . "\" />\n";
1809 1813 echo "<meta property=\"og:image:height\" content=\"" . esc_attr($og_height) . "\" />\n";
1810 1814 }
@@ -1809,9 +1813,9 @@
1809 1813 echo "<meta property=\"og:image:height\" content=\"" . esc_attr($og_height) . "\" />\n";
1810 1814 }
1811 1815 // Derive the real mime type instead of hardcoding image/jpeg,
1812 1816 // which mislabels PNG/WebP featured images.
1813 - $image_mime = get_post_mime_type($image_id);
1817 + $image_mime = $image_file['type'];
1814 1818 if ($image_mime) {
1815 1819 echo "<meta property=\"og:image:type\" content=\"" . esc_attr($image_mime) . "\" />\n";
1816 1820 }
1817 1821 }
@@ -2746,8 +2750,22 @@
2746 2750 // (term description, post type description, author bio)
2747 2751 $archive_description = $this->get_archive_meta_description();
2748 2752 if ($archive_description) {
2749 2753 return $archive_description;
2754 + }
2755 +
2756 + // The blog-index homepage's own description (Site Identity
2757 + // homepage_description, #897), in the same vocabulary as its title. A
2758 + // static front page is a page, and its description is set on it.
2759 + if (is_front_page() && is_home() && $this->site_identity_data && $this->site_identity_data['enabled']) {
2760 + $identity = $this->site_identity_manager->get_settings('site');
2761 + $template = trim((string) ($identity['homepage_description'] ?? ''));
2762 + if ($template !== '') {
2763 + $homepage_description = trim($this->process_title_template($template, $this->get_title_placeholders()));
2764 + if ($homepage_description !== '') {
2765 + return $homepage_description;
2766 + }
2767 + }
2750 2768 }
2751 2769
2752 2770 // Third priority: Site Identity default meta description
2753 2771 if ($this->site_identity_data && $this->site_identity_data['enabled']) {