PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/presenters/slack/enhanced-data-presenter.php +5 -4 18.6 → trunk View file →
@@ -25,13 +25,15 @@
25 25 public function present() {
26 26 $enhanced_data = $this->get();
27 27 $twitter_tags = '';
28 28 $i = 1;
29 + $class = \is_admin_bar_showing() ? ' class="yoast-seo-meta-tag"' : '';
29 30 foreach ( $enhanced_data as $label => $value ) {
30 - $twitter_tags .= \sprintf( "\t" . '<meta name="twitter:label%1$d" content="%2$s" />' . "\n", $i, $label );
31 - $twitter_tags .= \sprintf( "\t" . '<meta name="twitter:data%1$d" content="%2$s" />' . "\n", $i, $value );
31 + $twitter_tags .= \sprintf( "\t" . '<meta name="twitter:label%1$d" content="%2$s"' . $class . ' />' . "\n", $i, \esc_attr( $label ) );
32 + $twitter_tags .= \sprintf( "\t" . '<meta name="twitter:data%1$d" content="%2$s"' . $class . ' />' . "\n", $i, \esc_attr( $value ) );
32 33 ++$i;
33 34 }
35 +
34 36 return \trim( $twitter_tags );
35 37 }
36 38
37 39 /**
@@ -55,10 +57,9 @@
55 57
56 58 /**
57 59 * Filter: 'wpseo_enhanced_slack_data' - Allows filtering of the enhanced data for sharing on Slack.
58 60 *
59 - * @api array $data The enhanced Slack sharing data.
60 - *
61 + * @param array $data The enhanced Slack sharing data.
61 62 * @param Indexable_Presentation $presentation The presentation of an indexable.
62 63 */
63 64 return \apply_filters( 'wpseo_enhanced_slack_data', $data, $this->presentation );
64 65 }