| 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( 'WpssoMessagesTooltipMetaOpenGraph' ) ) { |
| 19 |
|
| 20 |
/* |
| 21 |
* Instantiated by WpssoMessagesTooltipMeta->get() only when needed. |
| 22 |
*/ |
| 23 |
class WpssoMessagesTooltipMetaOpenGraph extends WpssoMessages { |
| 24 |
|
| 25 |
public function get( $msg_key = false, $info = array() ) { |
| 26 |
|
| 27 |
$this->maybe_set_properties(); |
| 28 |
|
| 29 |
$text = ''; |
| 30 |
|
| 31 |
switch ( $msg_key ) { |
| 32 |
|
| 33 |
case 'tooltip-meta-og_schema_type': // Schema Type. |
| 34 |
|
| 35 |
$text = __( 'Select a document Schema type that best describes the main content of this webpage.', 'wpsso' ) . ' '; |
| 36 |
|
| 37 |
$text .= __( 'The Schema type option offers a much larger selection of types than the Open Graph type, and the Open Graph type may reflect the Schema type selected (the Open Graph type option will be disabled in this case).', 'wpsso' ) . ' '; |
| 38 |
|
| 39 |
$text .= __( 'As an example, a Schema type of "Article" will change the Open Graph type to "article", a Schema type of "Place" will change the Open Graph type to "place", a Schema type of "Product" will change the Open Graph type to "product", etc.', 'wpsso' ) . ' '; |
| 40 |
|
| 41 |
break; |
| 42 |
|
| 43 |
case 'tooltip-meta-og_type': // Open Graph Type. |
| 44 |
|
| 45 |
$text = __( 'Select a document Facebook / Open Graph type that best describes the main content of this webpage.', 'wpsso' ) . ' '; |
| 46 |
|
| 47 |
$text .= __( 'The Schema type option offers a much larger selection of types than the Open Graph type, and the Open Graph type may reflect the Schema type selected (the Open Graph type option will be disabled in this case).', 'wpsso' ) . ' '; |
| 48 |
|
| 49 |
$text .= __( 'As an example, a Schema type of "Article" will change the Open Graph type to "article", a Schema type of "Place" will change the Open Graph type to "place", a Schema type of "Product" will change the Open Graph type to "product", etc.', 'wpsso' ) . ' '; |
| 50 |
|
| 51 |
$text .= __( 'Note that for social sharing purposes, the document Open Graph type must be "article", "place", "product", or "website".', 'wpsso' ) . ' '; |
| 52 |
|
| 53 |
break; |
| 54 |
|
| 55 |
case 'tooltip-meta-og_title': // Social Title. |
| 56 |
|
| 57 |
$text = sprintf( __( 'A customized title for the Facebook / Open Graph %s meta tag.', 'wpsso' ), '<code>og:title</code>' ) . ' '; |
| 58 |
|
| 59 |
$text .= __( 'The default value is inherited from the SEO title.', 'wpsso' ) . ' '; |
| 60 |
|
| 61 |
$text .= sprintf( __( 'You may use the <code>%1$s</code> and/or <code>%2$s</code> filters to modify the default and custom values respectively.', 'wpsso' ), 'wpsso_the_title', 'wpsso_title' ) . ' '; |
| 62 |
|
| 63 |
break; |
| 64 |
|
| 65 |
case 'tooltip-meta-og_desc': // Social Description. |
| 66 |
|
| 67 |
$text = sprintf( __( 'A customized description for the Facebook / Open Graph %s meta tag.', 'wpsso' ), '<code>og:description</code>' ) . ' '; |
| 68 |
|
| 69 |
$text .= __( 'The default value is inherited from the SEO description.', 'wpsso' ) . ' '; |
| 70 |
|
| 71 |
$text .= sprintf( __( 'You may use the <code>%1$s</code> and/or <code>%2$s</code> filters to modify the default and custom values respectively.', 'wpsso' ), 'wpsso_the_description', 'wpsso_description' ) . ' '; |
| 72 |
|
| 73 |
break; |
| 74 |
|
| 75 |
case 'tooltip-meta-og_img_crop_area': // Crop Area. |
| 76 |
|
| 77 |
$text = __( 'Select the preferred cropping (ie. main subject) area of the image.', 'wpsso' ); |
| 78 |
|
| 79 |
break; |
| 80 |
|
| 81 |
case 'tooltip-meta-og_img_id': // Image ID. |
| 82 |
|
| 83 |
$text = __( 'A customized image ID to include first, before any featured, attached, or content images.', 'wpsso' ) . ' '; |
| 84 |
|
| 85 |
$text .= '<em>' . __( 'This option is disabled if a custom image URL is entered.', 'wpsso' ) . '</em>'; |
| 86 |
|
| 87 |
break; |
| 88 |
|
| 89 |
case 'tooltip-meta-og_img_url': // or an Image URL. |
| 90 |
|
| 91 |
$text = __( 'A customized image URL (instead of an image ID) to include first, before any featured, attached, or content images.', 'wpsso' ) . ' '; |
| 92 |
|
| 93 |
$text .= __( 'Make sure your custom image is large enough or it may be ignored by social website(s).', 'wpsso' ) . ' '; |
| 94 |
|
| 95 |
$text .= $this->fb_prefs_transl . ' '; |
| 96 |
|
| 97 |
$text .= '<em>' . __( 'This option is disabled if a custom image ID is selected.', 'wpsso' ) . '</em>'; |
| 98 |
|
| 99 |
break; |
| 100 |
|
| 101 |
case 'tooltip-meta-og_vid_embed': // Video Embed HTML. |
| 102 |
|
| 103 |
$text = __( 'Video embed HTML code (ie. figure, iframe, or embed HTML code) for the first video included in the meta tags and Schema JSON-LD markup.', 'wpsso' ) . ' '; |
| 104 |
|
| 105 |
$text .= __( 'If the video is from a recognized external video service, an API connection will be made to retrieve additional information about the video.', 'wpsso' ); |
| 106 |
|
| 107 |
break; |
| 108 |
|
| 109 |
case 'tooltip-meta-og_vid_url': // or a Video URL. |
| 110 |
|
| 111 |
$text = __( 'A video URL for the first video included in the meta tags and Schema JSON-LD markup.', 'wpsso' ) . ' '; |
| 112 |
|
| 113 |
$text .= __( 'If the video is from a recognized external video service, an API connection will be made to retrieve additional information about the video.', 'wpsso' ); |
| 114 |
|
| 115 |
break; |
| 116 |
|
| 117 |
case 'tooltip-meta-og_vid_title': // Video Name. |
| 118 |
case 'tooltip-meta-og_vid_desc': // Video Description. |
| 119 |
case 'tooltip-meta-og_vid_dimensions': // Video Dimensions. |
| 120 |
case 'tooltip-meta-og_vid_upload_date': // Video Upload Date. |
| 121 |
|
| 122 |
$text = sprintf( __( 'The %s video APIs can include additional information about a video (ie. name / title, description, dimensions, stream URL, etc.), provided that this information is available from the video service API, or the information has been entered here manually.', 'wpsso' ), $this->p_name_pro ) . ' '; |
| 123 |
|
| 124 |
break; |
| 125 |
|
| 126 |
case 'tooltip-meta-og_vid_stream_url': // Video Stream URL. |
| 127 |
|
| 128 |
$text = $this->get( 'tooltip-meta-og_vid_title' ) . ' '; |
| 129 |
|
| 130 |
$text .= __( 'The stream URL should be a publicly available URL to the video file (mkv, mp4, etc.) or video data stream (not an HTML webpage).', 'wpsso' ) . ' '; |
| 131 |
|
| 132 |
$text .= __( 'The stream URL will be used for the Schema contentUrl property value in the Schema VideoObject markup.', 'wpsso' ) . ' '; |
| 133 |
|
| 134 |
break; |
| 135 |
|
| 136 |
default: |
| 137 |
|
| 138 |
$text = apply_filters( 'wpsso_messages_tooltip_meta_og', $text, $msg_key, $info ); |
| 139 |
|
| 140 |
break; |
| 141 |
} |
| 142 |
|
| 143 |
return $text; |
| 144 |
} |
| 145 |
} |
| 146 |
} |
| 147 |
|