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/builders/indexable-social-image-trait.php +10 -2 18.7 → trunk View file →
@@ -11,10 +11,8 @@
11 11 /**
12 12 * Trait for determine the social image to use in the indexable.
13 13 *
14 14 * Represents the trait used in builders for handling social images.
15 - *
16 - * @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
17 15 */
18 16 trait Indexable_Social_Image_Trait {
19 17
20 18 /**
@@ -45,8 +43,10 @@
45 43 *
46 44 * @param Image_Helper $image The image helper.
47 45 * @param Open_Graph_Image_Helper $open_graph_image The Open Graph image helper.
48 46 * @param Twitter_Image_Helper $twitter_image The Twitter image helper.
47 + *
48 + * @return void
49 49 */
50 50 public function set_social_image_helpers(
51 51 Image_Helper $image,
52 52 Open_Graph_Image_Helper $open_graph_image,
@@ -61,8 +61,10 @@
61 61 * Sets the alternative on an indexable.
62 62 *
63 63 * @param array $alternative_image The alternative image to set.
64 64 * @param Indexable $indexable The indexable to set image for.
65 + *
66 + * @return void
65 67 */
66 68 protected function set_alternative_image( array $alternative_image, Indexable $indexable ) {
67 69 if ( ! empty( $alternative_image['image_id'] ) ) {
68 70 if ( ! $indexable->open_graph_image_source && ! $indexable->open_graph_image_id ) {
@@ -95,8 +97,10 @@
95 97 /**
96 98 * Sets the Open Graph image meta data for an og image
97 99 *
98 100 * @param Indexable $indexable The indexable.
101 + *
102 + * @return void
99 103 */
100 104 protected function set_open_graph_image_meta_data( Indexable $indexable ) {
101 105 if ( ! $indexable->open_graph_image_id ) {
102 106 return;
@@ -113,8 +117,10 @@
113 117 /**
114 118 * Handles the social images.
115 119 *
116 120 * @param Indexable $indexable The indexable to handle.
121 + *
122 + * @return void
117 123 */
118 124 protected function handle_social_images( Indexable $indexable ) {
119 125 // When the image or image id is set.
120 126 if ( $indexable->open_graph_image || $indexable->open_graph_image_id ) {
@@ -145,8 +151,10 @@
145 151 /**
146 152 * Resets the social images.
147 153 *
148 154 * @param Indexable $indexable The indexable to set images for.
155 + *
156 + * @return void
149 157 */
150 158 protected function reset_social_images( Indexable $indexable ) {
151 159 $indexable->open_graph_image = null;
152 160 $indexable->open_graph_image_id = null;