PluginProbe
WPSSO Core – Complete Schema Markup and Meta Tags / 22.7.0
WPSSO Core – Complete Schema Markup and Meta Tags v22.7.0
22.7.0 22.6.1 22.6.0 22.5.3 22.5.2 22.5.1 22.4.0 22.3.0 22.2.1 22.2.0 22.1.3 22.1.2 22.1.1 22.1.0 22.0.0 21.13.3 21.13.2 trunk 21.13.1
← All changes | lib/messages-tooltip.php +749 -0 22.0.022.7.0 View file →
@@ -1,0 +1,749 @@
1 +<?php
2 +/*
3 + * License: GPLv3
4 + * License URI: https://www.gnu.org/licenses/gpl.txt
5 + * Copyright 2012-2026 Jean-Sebastien Morisset (https://wpsso.com/)
6 + */
7 +
8 +if ( ! defined( 'ABSPATH' ) ) {
9 +
10 + die( 'These aren\'t the droids you\'re looking for.' );
11 +}
12 +
13 +if ( ! defined( 'WPSSO_PLUGINDIR' ) ) {
14 +
15 + die( 'Do. Or do not. There is no try.' );
16 +}
17 +
18 +if ( ! class_exists( 'WpssoMessagesTooltip' ) ) {
19 +
20 + /*
21 + * Instantiated by WpssoMessages->get() only when needed.
22 + */
23 + class WpssoMessagesTooltip extends WpssoMessages {
24 +
25 + private $meta = null; // WpssoMessagesTooltipMeta class object.
26 + private $og = null; // WpssoMessagesTooltipOpenGraph class object.
27 + private $plugin = null; // WpssoMessagesTooltipPlugin class object.
28 + private $schema = null; // WpssoMessagesTooltipSchema class object.
29 + private $site = null; // WpssoMessagesTooltipSite class object.
30 +
31 + public function get( $msg_key = false, $info = array() ) {
32 +
33 + $this->maybe_set_properties();
34 +
35 + $text = '';
36 +
37 + /*
38 + * Document SSO metabox tooltips.
39 + */
40 + if ( 0 === strpos( $msg_key, 'tooltip-meta-' ) ) {
41 +
42 + /*
43 + * Instantiate WpssoMessagesTooltipMeta only when needed.
44 + */
45 + if ( null === $this->meta ) {
46 +
47 + require_once WPSSO_PLUGINDIR . 'lib/messages-tooltip-meta.php';
48 +
49 + $this->meta = new WpssoMessagesTooltipMeta( $this->p );
50 + }
51 +
52 + return $this->meta->get( $msg_key, $info );
53 +
54 + /*
55 + * Open Graph settings
56 + */
57 + } elseif ( 0 === strpos( $msg_key, 'tooltip-og_' ) ) {
58 +
59 + /*
60 + * Instantiate WpssoMessagesTooltipOpenGraph only when needed.
61 + */
62 + if ( null === $this->og ) {
63 +
64 + require_once WPSSO_PLUGINDIR . 'lib/messages-tooltip-opengraph.php';
65 +
66 + $this->og = new WpssoMessagesTooltipOpenGraph( $this->p );
67 + }
68 +
69 + return $this->og->get( $msg_key, $info );
70 +
71 + /*
72 + * Advanced plugin settings.
73 + */
74 + } elseif ( 0 === strpos( $msg_key, 'tooltip-plugin_' ) ) {
75 +
76 + /*
77 + * Instantiate WpssoMessagesTooltipPlugin only when needed.
78 + */
79 + if ( null === $this->plugin ) {
80 +
81 + require_once WPSSO_PLUGINDIR . 'lib/messages-tooltip-plugin.php';
82 +
83 + $this->plugin = new WpssoMessagesTooltipPlugin( $this->p );
84 + }
85 +
86 + return $this->plugin->get( $msg_key, $info );
87 +
88 + /*
89 + * Schema settings.
90 + */
91 + } elseif ( 0 === strpos( $msg_key, 'tooltip-schema_' ) ) {
92 +
93 + /*
94 + * Instantiate WpssoMessagesTooltipSchema only when needed.
95 + */
96 + if ( null === $this->schema ) {
97 +
98 + require_once WPSSO_PLUGINDIR . 'lib/messages-tooltip-schema.php';
99 +
100 + $this->schema = new WpssoMessagesTooltipSchema( $this->p );
101 + }
102 +
103 + return $this->schema->get( $msg_key, $info );
104 +
105 + /*
106 + * Site settings.
107 + */
108 + } elseif ( 0 === strpos( $msg_key, 'tooltip-site_' ) ) {
109 +
110 + /*
111 + * Instantiate WpssoMessagesTooltipSite only when needed.
112 + */
113 + if ( null === $this->site ) {
114 +
115 + require_once WPSSO_PLUGINDIR . 'lib/messages-tooltip-site.php';
116 +
117 + $this->site = new WpssoMessagesTooltipSite( $this->p );
118 + }
119 +
120 + return $this->site->get( $msg_key, $info );
121 +
122 + /*
123 + * Behance settings.
124 + */
125 + } elseif ( 0 === strpos( $msg_key, 'tooltip-behance_' ) ) {
126 +
127 + switch ( $msg_key ) {
128 +
129 + case 'tooltip-behance_publisher_url':
130 +
131 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'behance_publisher_url' ) ) {
132 +
133 + $text = sprintf( __( 'If you have a <a href="%s">Behance profile for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://www.behance.net/', 'wpsso' ) ) . ' ';
134 +
135 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
136 +
137 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
138 + }
139 +
140 + break;
141 + }
142 +
143 + /*
144 + * Facebook settings.
145 + */
146 + } elseif ( 0 === strpos( $msg_key, 'tooltip-fb_' ) ) {
147 +
148 + switch ( $msg_key ) {
149 +
150 + case 'tooltip-fb_site_verify': // Facebook Domain Verification ID.
151 +
152 + $text = sprintf( __( 'To <a href="%s">verify your domain with Facebook</a>, enter the "facebook-domain-verification" meta tag <code>content</code> value here (enter only the verification ID value, not the whole HTML tag).', 'wpsso' ), 'https://developers.facebook.com/docs/sharing/domain-verification/verifying-your-domain/' );
153 +
154 + break;
155 +
156 + case 'tooltip-fb_publisher_url': // Facebook Business Page URL (localized).
157 +
158 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'fb_publisher_url' ) ) {
159 +
160 + $text = sprintf( __( 'If you have a <a href="%s">Facebook page for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://www.facebook.com/business', 'wpsso' ) ) . ' ';
161 +
162 + $text .= sprintf( __( 'The %s will be included in Open Graph <em>article</em> meta tags and the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
163 +
164 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
165 + }
166 +
167 + break;
168 +
169 + case 'tooltip-fb_author_field': // Author Profile URL Field.
170 +
171 + $cm_label_value = SucomUtilOptions::get_key_value( 'plugin_cm_fb_label', $this->p->options );
172 +
173 + $text = sprintf( __( 'Choose a contact field from the WordPress profile page to use for the Facebook / Open Graph %s meta tag value.', 'wpsso' ), '<code>article:author</code>' ) . ' ';
174 +
175 + $text .= sprintf( __( 'The suggested value is the "%s" user profile contact field.', 'wpsso' ), $cm_label_value ) . ' ';
176 +
177 + break;
178 +
179 + case 'tooltip-fb_app_id': // Facebook Application ID.
180 +
181 + $fb_docs_url = __( 'https://developers.facebook.com/docs/development/create-an-app', 'wpsso' );
182 +
183 + $text = sprintf( __( 'If you have a Facebook App ID for your WebSite App, enter it here (see <a href="%s">Create an App</a> for help on creating a Facebook App ID for your WebSite).', 'wpsso' ), $fb_docs_url ) . ' ';
184 +
185 + break;
186 +
187 + case 'tooltip-fb_locale': // Facebook Locale.
188 +
189 + /*
190 + * See SucomUtil::get_publisher_languages( 'facebook' ).
191 + */
192 + $text = __( 'Facebook does not understand all WordPress locale values.', 'wpsso' ) . ' ';
193 +
194 + $text .= sprintf( __( 'If the Facebook debugger returns an error parsing the %s meta tag, you should choose an alternate Facebook language for that WordPress locale.', 'wpsso' ), '<code>og:locale</code>' );
195 +
196 + break;
197 +
198 + default:
199 +
200 + $text = apply_filters( 'wpsso_messages_tooltip_fb', $text, $msg_key, $info );
201 +
202 + break;
203 +
204 + } // End of 'tooltip-fb' switch.
205 +
206 + /*
207 + * Google settings.
208 + */
209 + } elseif ( 0 === strpos( $msg_key, 'tooltip-g_' ) ) {
210 +
211 + switch ( $msg_key ) {
212 +
213 + case 'tooltip-g_site_verify': // Google Website Verification ID.
214 +
215 + $text = sprintf( __( 'To verify your website ownership with <a href="%s">Google\'s Search Console</a>, select the <em>Settings</em> left-side menu option in the Search Console, then <em>Ownership and verification</em>, and then choose the <em>HTML tag</em> method.', 'wpsso' ), 'https://search.google.com/search-console' ) . ' ';
216 +
217 + $text .= __( 'Enter the "google-site-verification" meta tag <code>content</code> value here (enter only the verification ID value, not the whole HTML tag).', 'wpsso' );
218 +
219 + break;
220 +
221 + default:
222 +
223 + $text = apply_filters( 'wpsso_messages_tooltip_g', $text, $msg_key, $info );
224 +
225 + break;
226 +
227 + } // End of 'tooltip-g' switch.
228 +
229 + /*
230 + * SEO settings.
231 + */
232 + } elseif ( 0 === strpos( $msg_key, 'tooltip-seo_' ) ) {
233 +
234 + switch ( $msg_key ) {
235 +
236 + default:
237 +
238 + $text = apply_filters( 'wpsso_messages_tooltip_seo', $text, $msg_key, $info );
239 +
240 + break;
241 +
242 + } // End of 'tooltip-seo' switch.
243 +
244 + /*
245 + * Robots settings.
246 + */
247 + } elseif ( 0 === strpos( $msg_key, 'tooltip-robots_' ) ) {
248 +
249 + switch ( $msg_key ) {
250 +
251 + /*
252 + * See https://developers.google.com/search/reference/robots_meta_tag#max-snippet.
253 + */
254 + case 'tooltip-robots_max_snippet': // Robots Snippet Max. Length
255 +
256 + $text = __( 'Suggest a maximum of number characters for the textual snippet in search results.', 'wpsso' ) . ' ';
257 +
258 + $text .= __( 'This does not affect image or video previews, or apply to text in Schema markup.', 'wpsso' );
259 +
260 + break;
261 +
262 + /*
263 + * See https://developers.google.com/search/reference/robots_meta_tag#max-image-preview.
264 + */
265 + case 'tooltip-robots_max_image_preview':
266 +
267 + $none = _x( $this->p->cf[ 'form' ][ 'robots_max_image_preview' ][ 'none' ], 'option value', 'wpsso' );
268 + $standard = _x( $this->p->cf[ 'form' ][ 'robots_max_image_preview' ][ 'standard' ], 'option value', 'wpsso' );
269 + $large = _x( $this->p->cf[ 'form' ][ 'robots_max_image_preview' ][ 'large' ], 'option value', 'wpsso' );
270 +
271 + $text = __( 'Suggest a maximum size for the image preview in search results.', 'wpsso' ) . ' ';
272 +
273 + $text .= '<ul>';
274 +
275 + $text .= '<li>' . sprintf( __( '%s = No image preview will be shown.', 'wpsso' ), $none ) . '</li> ';
276 +
277 + $text .= '<li>' . sprintf( __( '%s = A default image preview size may be used.', 'wpsso' ), $standard ) . '</li> ';
278 +
279 + $text .= '<li>' . sprintf( __( '%s = A larger image preview size, up to the width of the viewport, may be used.',
280 + 'wpsso' ), $large ) . '</li> ';
281 +
282 + $text .= '</ul> ';
283 +
284 + $text .= sprintf( __( 'If you don\'t want Google to use a larger thumbnail when an AMP page or canonical version of an article is shown in Search or Discover, select %1$s or %2$s.', 'wpsso' ), $standard, $none );
285 +
286 + break;
287 +
288 + /*
289 + * See https://developers.google.com/search/reference/robots_meta_tag#max-video-preview.
290 + */
291 + case 'tooltip-robots_max_video_preview':
292 +
293 + $text = __( 'Suggest a maximum of number seconds for video snippets in search results.', 'wpsso' );
294 +
295 + $text .= '<ul>';
296 +
297 + $text .= '<li>' . __( '0 = Shows a static image for videos, if image previews are allowed in search results.', 'wpsso' ) . '</li>';
298 +
299 + $text .= '<li>' . __( '-1 = No limit.', 'wpsso' ) . '</li>';
300 +
301 + $text .= '</ul>';
302 +
303 + break;
304 +
305 + default:
306 +
307 + $text = apply_filters( 'wpsso_messages_tooltip_robots', $text, $msg_key, $info );
308 +
309 + break;
310 +
311 + } // End of 'tooltip-robots' switch.
312 +
313 + $text .= $this->maybe_add_seo_tag_disabled_link( 'meta name robots' );
314 +
315 + /*
316 + * Pinterest settings.
317 + */
318 + } elseif ( 0 === strpos( $msg_key, 'tooltip-pin_' ) ) {
319 +
320 + switch ( $msg_key ) {
321 +
322 + case 'tooltip-pin_site_verify': // Pinterest Website Verification ID.
323 +
324 + $text = sprintf( __( 'To <a href="%s">claim your website with Pinterest</a>: Edit your account settings on Pinterest, select the "Claim" section, enter your website URL, then click the "Claim" button.', 'wpsso' ), 'https://help.pinterest.com/en/business/article/claim-your-website' ) . ' ';
325 +
326 + $text .= __( 'Choose "Add HTML tag" and enter the "p:domain_verify" meta tag <code>content</code> value here (enter only the verification ID string, not the meta tag HTML).', 'wpsso' );
327 +
328 + break;
329 +
330 + case 'tooltip-pin_publisher_url':
331 +
332 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'pin_publisher_url' ) ) {
333 +
334 + $text = sprintf( __( 'If you have a <a href="%s">Pinterest page for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://business.pinterest.com/', 'wpsso' ) ) . ' ';
335 +
336 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
337 +
338 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
339 + }
340 +
341 + break;
342 +
343 + case 'tooltip-pin_add_nopin_header_img_tag': // Add "nopin" to Site Header Image.
344 +
345 + $text = sprintf( __( 'Add a %s attribute to the site header and Gravatar images to prevent the Pinterest Pin It browser button from suggesting these images.', 'wpsso' ), '<code>data-pin-nopin</code>' );
346 +
347 + break;
348 +
349 + case 'tooltip-pin_add_nopin_media_img_tag': // Add Pinterest "nopin" to Images.
350 +
351 + $add_img_html_label = _x( 'Add Hidden Image for Pinterest', 'option label', 'wpsso' );
352 +
353 + $text = sprintf( __( '%1$s can add a %2$s attribute to resized images from the WordPress Media Library.', 'wpsso' ), $info[ 'short' ], '<code>data-pin-nopin</code>' ) . ' ';
354 +
355 + $text .= __( 'This prevents the Pinterest Pin It browser button from suggesting images that may be too small.', 'wpsso' ) . ' ';
356 +
357 + $text .= sprintf( __( 'When enabling this option, you should also enable the "%s" option to provide an image for the Pin It browser button.', 'wpsso' ), $add_img_html_label ) . ' ';
358 +
359 + break;
360 +
361 + case 'tooltip-pin_add_img_html': // Add Hidden Image for Pinterest.
362 +
363 + $text = __( 'Add an extra hidden image for the Pinterest Pin It browser button in the WordPress singular post/page content, author description, post types archive description, and term description.', 'wpsso' ) . ' ';
364 +
365 + $text .= __( 'Although generally recommended, this option is disabled by default since the extra image can affect page load speed (the image cannot be lazy loaded).', 'wpsso' ) . ' ';
366 +
367 + $text .= __( 'If your website visitors use the Pinterest Pin It browser button, you may enable this option, otherwise leave it unchecked.', 'wpsso' ) . ' ';
368 +
369 + break;
370 +
371 + case 'tooltip-pin_img_size': // Pinterest Pin It Image Size.
372 +
373 + $def_img_dims = $this->get_def_img_dims( 'pin' );
374 +
375 + $text = sprintf( __( 'The dimensions used for the Pinterest Pin It browser button image (default dimensions are %s).', 'wpsso' ), $def_img_dims ) . ' ';
376 +
377 + break;
378 +
379 + default:
380 +
381 + $text = apply_filters( 'wpsso_messages_tooltip_p', $text, $msg_key, $info );
382 +
383 + break;
384 +
385 + } // End of 'tooltip-p' switch.
386 +
387 + /*
388 + * X (Twitter) settings.
389 + */
390 + } elseif ( 0 === strpos( $msg_key, 'tooltip-tc_' ) ) {
391 +
392 + switch ( $msg_key ) {
393 +
394 + case 'tooltip-tc_site': // X (Twitter) Business @username.
395 +
396 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'tc_site' ) ) {
397 +
398 + $text = sprintf( __( 'If you have a <a href="%s">X (Twitter) @username for your business</a> (not your personal @username), you may enter its name here.', 'wpsso' ), __( 'https://business.twitter.com/', 'wpsso' ) ) . ' ';
399 +
400 + $text .= sprintf( __( 'The %s will be included in in X (Twitter) Card meta tags and the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
401 +
402 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
403 + }
404 +
405 + break;
406 +
407 + case 'tooltip-tc_type_singular': // X (Twitter) Card for Singular with Image.
408 +
409 + $text = 'The X (Twitter) Card type for singular content (posts, pages, or custom post types) with a custom, featured, and/or attached image.';
410 +
411 + break;
412 +
413 + case 'tooltip-tc_type_default': // X (Twitter) Card Type by Default.
414 +
415 + $text = 'The X (Twitter) Card type for all other images (default, image from content text, etc).';
416 +
417 + break;
418 +
419 + case 'tooltip-tc_sum_img_size': // X (Twitter) Summary Card.
420 +
421 + $def_img_dims = $this->get_def_img_dims( $opt_pre = 'tc_sum' );
422 +
423 + $text = sprintf( __( 'The dimensions used for the <a href="%1$s">Summary Card</a> image should be at least %2$s (default dimensions are %3$s).', 'wpsso' ), 'https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary', '144x144px', $def_img_dims ) . ' ';
424 +
425 + break;
426 +
427 + case 'tooltip-tc_lrg_img_size': // X (Twitter) Summary Card Large Image.
428 +
429 + $def_img_dims = $this->get_def_img_dims( $opt_pre = 'tc_lrg' );
430 +
431 + $text = sprintf( __( 'The dimensions used for the <a href="%1$s">Large Image Summary Card</a> must be larger than %2$s (default dimensions are %3$s).', 'wpsso' ), 'https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary-card-with-large-image', '300x157px', $def_img_dims ) . ' ';
432 +
433 + break;
434 +
435 + default:
436 +
437 + $text = apply_filters( 'wpsso_messages_tooltip_tc', $text, $msg_key, $info );
438 +
439 + break;
440 +
441 + } // End of 'tooltip-tc' switch.
442 +
443 + /*
444 + * Instagram settings.
445 + */
446 + } elseif ( 0 === strpos( $msg_key, 'tooltip-instagram_' ) ) {
447 +
448 + switch ( $msg_key ) {
449 +
450 + case 'tooltip-instagram_publisher_url':
451 +
452 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'instagram_publisher_url' ) ) {
453 +
454 + $text = sprintf( __( 'If you have an <a href="%s">Intagram profile for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://business.instagram.com/getting-started', 'wpsso' ) ) . ' ';
455 +
456 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
457 +
458 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
459 + }
460 +
461 + break;
462 +
463 + default:
464 +
465 + $text = apply_filters( 'wpsso_messages_tooltip_instagram', $text, $msg_key, $info );
466 +
467 + break;
468 +
469 + } // End of 'tooltip-instagram' switch.
470 +
471 + /*
472 + * LinkedIn settings.
473 + */
474 + } elseif ( 0 === strpos( $msg_key, 'tooltip-linkedin_' ) ) {
475 +
476 + switch ( $msg_key ) {
477 +
478 + case 'tooltip-linkedin_publisher_url':
479 +
480 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'linkedin_publisher_url' ) ) {
481 +
482 + $text = sprintf( __( 'If you have a <a href="%s">LinkedIn page for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://business.linkedin.com/marketing-solutions/linkedin-pages', 'wpsso' ) ) . ' ';
483 +
484 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
485 +
486 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
487 + }
488 +
489 + break;
490 +
491 + default:
492 +
493 + $text = apply_filters( 'wpsso_messages_tooltip_linkedin', $text, $msg_key, $info );
494 +
495 + break;
496 +
497 + } // End of 'tooltip-linkedin' switch.
498 +
499 + /*
500 + * Medium settings.
501 + */
502 + } elseif ( 0 === strpos( $msg_key, 'tooltip-medium_' ) ) {
503 +
504 + switch ( $msg_key ) {
505 +
506 + case 'tooltip-medium_publisher_url':
507 +
508 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'medium_publisher_url' ) ) {
509 +
510 + $text = sprintf( __( 'If you have a <a href="%s">Medium page for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://medium.com/', 'wpsso' ) ) . ' ';
511 +
512 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
513 +
514 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
515 + }
516 +
517 + break;
518 +
519 + default:
520 +
521 + $text = apply_filters( 'wpsso_messages_tooltip_medium', $text, $msg_key, $info );
522 +
523 + break;
524 +
525 + } // End of 'tooltip-medium' switch.
526 +
527 + /*
528 + * Myspace settings.
529 + */
530 + } elseif ( 0 === strpos( $msg_key, 'tooltip-myspace_' ) ) {
531 +
532 + switch ( $msg_key ) {
533 +
534 + case 'tooltip-myspace_publisher_url':
535 +
536 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'myspace_publisher_url' ) ) {
537 +
538 + $text = sprintf( __( 'If you have a <a href="%s">Myspace page for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://myspace.com/', 'wpsso' ) ) . ' ';
539 +
540 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
541 +
542 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
543 + }
544 +
545 + break;
546 +
547 + default:
548 +
549 + $text = apply_filters( 'wpsso_messages_tooltip_myspace', $text, $msg_key, $info );
550 +
551 + break;
552 +
553 + } // End of 'tooltip-myspace' switch.
554 +
555 + /*
556 + * Soundcloud settings.
557 + */
558 + } elseif ( 0 === strpos( $msg_key, 'tooltip-sc_' ) ) {
559 +
560 + switch ( $msg_key ) {
561 +
562 + case 'tooltip-sc_publisher_url':
563 +
564 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'sc_publisher_url' ) ) {
565 +
566 + $text = sprintf( __( 'If you have a <a href="%s">Soundcloud page for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://soundcloud.com/', 'wpsso' ) ) . ' ';
567 +
568 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
569 +
570 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
571 + }
572 +
573 + break;
574 +
575 + default:
576 +
577 + $text = apply_filters( 'wpsso_messages_tooltip_sc', $text, $msg_key, $info );
578 +
579 + break;
580 +
581 + } // End of 'tooltip-sc' switch.
582 +
583 + /*
584 + * TikTok settings.
585 + */
586 + } elseif ( 0 === strpos( $msg_key, 'tooltip-tiktok_' ) ) {
587 +
588 + switch ( $msg_key ) {
589 +
590 + case 'tooltip-tiktok_publisher_url':
591 +
592 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'tiktok_publisher_url' ) ) {
593 +
594 + $text = sprintf( __( 'If you have a <a href="%s">TikTok page for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://tiktok.com/', 'wpsso' ) ) . ' ';
595 +
596 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
597 +
598 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
599 + }
600 +
601 + break;
602 +
603 + default:
604 +
605 + $text = apply_filters( 'wpsso_messages_tooltip_tiktok', $text, $msg_key, $info );
606 +
607 + break;
608 +
609 + } // End of 'tooltip-tiktok' switch.
610 +
611 + /*
612 + * Tumblr settings.
613 + */
614 + } elseif ( 0 === strpos( $msg_key, 'tooltip-tumblr_' ) ) {
615 +
616 + switch ( $msg_key ) {
617 +
618 + case 'tooltip-tumblr_publisher_url':
619 +
620 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'tumblr_publisher_url' ) ) {
621 +
622 + $text = sprintf( __( 'If you have a <a href="%s">Tumblr page for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://tumblr.com/', 'wpsso' ) ) . ' ';
623 +
624 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
625 +
626 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
627 + }
628 +
629 + break;
630 +
631 + default:
632 +
633 + $text = apply_filters( 'wpsso_messages_tooltip_tumblr', $text, $msg_key, $info );
634 +
635 + break;
636 +
637 + } // End of 'tooltip-tumblr' switch.
638 +
639 + /*
640 + * Wikipedia settings.
641 + */
642 + } elseif ( 0 === strpos( $msg_key, 'tooltip-wikipedia_' ) ) {
643 +
644 + switch ( $msg_key ) {
645 +
646 + case 'tooltip-wikipedia_publisher_url':
647 +
648 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'wikipedia_publisher_url' ) ) {
649 +
650 + $text = sprintf( __( 'If you have a <a href="%s">Wikipedia page for your organization</a>, you may enter its URL here.', 'wpsso' ), __( 'https://en.wikipedia.org/wiki/Wikipedia:FAQ/Organizations', 'wpsso' ) ) . ' ';
651 +
652 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
653 +
654 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
655 + }
656 +
657 + break;
658 +
659 + default:
660 +
661 + $text = apply_filters( 'wpsso_messages_tooltip_wikipedia', $text, $msg_key, $info );
662 +
663 + break;
664 +
665 + } // End of 'tooltip-wikipedia' switch.
666 +
667 + /*
668 + * YouTube settings.
669 + */
670 + } elseif ( 0 === strpos( $msg_key, 'tooltip-yt_' ) ) {
671 +
672 + switch ( $msg_key ) {
673 +
674 + case 'tooltip-yt_publisher_url':
675 +
676 + if ( $publisher_url_label = WpssoConfig::get_social_accounts( 'yt_publisher_url' ) ) {
677 +
678 + $text = sprintf( __( 'If you have a <a href="%s">YouTube channel for your business</a>, you may enter its URL here.', 'wpsso' ), __( 'https://youtube.com/', 'wpsso' ) ) . ' ';
679 +
680 + $text .= sprintf( __( 'The %s will be included in the website\'s Schema Organization markup.', 'wpsso' ), $publisher_url_label ) . ' ';
681 +
682 + $text .= __( 'Google Search may use this URL to display additional information about the website, business, or company in its search results.', 'wpsso' );
683 + }
684 +
685 + break;
686 +
687 + default:
688 +
689 + $text = apply_filters( 'wpsso_messages_tooltip_yt', $text, $msg_key, $info );
690 +
691 + break;
692 +
693 + } // End of 'tooltip-yt' switch.
694 +
695 + /*
696 + * WPSSO AM add-on.
697 + */
698 + } elseif ( 0 === strpos( $msg_key, 'tooltip-am_' ) ) {
699 +
700 + return apply_filters( 'wpsso_messages_tooltip_am', $text, $msg_key, $info );
701 +
702 + /*
703 + * WPSSO RRSSB add-on.
704 + */
705 + } elseif ( 0 === strpos( $msg_key, 'tooltip-buttons_' ) ) {
706 +
707 + return apply_filters( 'wpsso_messages_tooltip_buttons', $text, $msg_key, $info );
708 +
709 + /*
710 + * All other tooltips.
711 + */
712 + } else {
713 +
714 + switch ( $msg_key ) {
715 +
716 + case 'tooltip-custom-cm-field-id':
717 +
718 + $text .= '<strong>' . sprintf( __( 'You should not modify the <em>%s</em> column unless you have a <em>very</em> good reason to do so.', 'wpsso' ), _x( 'Contact Field ID', 'column title', 'wpsso' ) ) . '</strong> ';
719 +
720 + $text .= sprintf( __( 'As an example, to match the <em>%1$s</em> of a theme or other plugin, you might change "%2$s" to "%3$s" or some other value.', 'wpsso' ), _x( 'Contact Field ID', 'column title', 'wpsso' ), 'facebook', 'fb' );
721 +
722 + break;
723 +
724 + case 'tooltip-custom-cm-field-label':
725 +
726 + $text = sprintf( __( 'The %s column is for display purposes only and can be changed as you wish.', 'wpsso' ), _x( 'Contact Field Label', 'column title', 'wpsso' ) );
727 +
728 + break;
729 +
730 + case 'tooltip-wp-cm-field-id':
731 +
732 + $text = sprintf( __( 'The WordPress <em>%s</em> column cannot be modified.', 'wpsso' ), _x( 'Contact Field ID', 'column title', 'wpsso' ) );
733 +
734 + break;
735 +
736 + default:
737 +
738 + $text = apply_filters( 'wpsso_messages_tooltip', $text, $msg_key, $info );
739 +
740 + break;
741 +
742 + } // End of other tooltips.
743 +
744 + } // End of tooltips.
745 +
746 + return $text;
747 + }
748 + }
749 +}