| 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( 'WpssoMessagesTooltipOpenGraph' ) ) { |
| 19 |
|
| 20 |
/* |
| 21 |
* Instantiated by WpssoMessagesTooltip->get() only when needed. |
| 22 |
*/ |
| 23 |
class WpssoMessagesTooltipOpenGraph 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 |
/* |
| 34 |
* SSO > General Settings > Site Information tab. |
| 35 |
*/ |
| 36 |
case 'tooltip-og_def_country': // Default Country. |
| 37 |
|
| 38 |
$text = __( 'The default country when entering information about a place or location.', 'wpsso' ); |
| 39 |
|
| 40 |
break; |
| 41 |
|
| 42 |
case 'tooltip-og_def_timezone': // Default Timezone. |
| 43 |
|
| 44 |
$text = __( 'The default timezone when entering information about a place or location.', 'wpsso' ); |
| 45 |
|
| 46 |
break; |
| 47 |
|
| 48 |
case 'tooltip-og_def_currency': // Default Currency. |
| 49 |
|
| 50 |
$text = __( 'The default currency for currency related options (product price, job salary, etc.).', 'wpsso' ); |
| 51 |
|
| 52 |
break; |
| 53 |
|
| 54 |
case 'tooltip-og_def_dimension_units': // Default Dimension Units. |
| 55 |
|
| 56 |
$text = __( 'The default unit for net and shipping lengths, widths, and heights of products.', 'wpsso' ); |
| 57 |
|
| 58 |
break; |
| 59 |
|
| 60 |
case 'tooltip-og_def_weight_units': // Default Weight Units. |
| 61 |
|
| 62 |
$text = __( 'The default unit for net and shipping weights of products.', 'wpsso' ); |
| 63 |
|
| 64 |
break; |
| 65 |
|
| 66 |
case 'tooltip-og_def_fluid_volume_units': // Default Fluid Volume Units. |
| 67 |
|
| 68 |
$text = __( 'The default unit for fluid volumes of products.', 'wpsso' ); |
| 69 |
|
| 70 |
break; |
| 71 |
|
| 72 |
/* |
| 73 |
* SSO > General Settings > Titles / Descriptions tab. |
| 74 |
*/ |
| 75 |
case 'tooltip-og_title_sep': // Title Separator. |
| 76 |
|
| 77 |
$def_title_sep = $this->p->opt->get_defaults( 'og_title_sep' ); |
| 78 |
|
| 79 |
$text = sprintf( __( 'One or more characters used to separate values (category parent names, page numbers, site name, etc.) within a title string (default is a hyphen "%s").', 'wpsso' ), $def_title_sep ); |
| 80 |
|
| 81 |
break; |
| 82 |
|
| 83 |
case 'tooltip-og_ellipsis': // Truncated Text Ellipsis. |
| 84 |
|
| 85 |
$def_title_sep = $this->p->opt->get_defaults( 'og_ellipsis' ); |
| 86 |
|
| 87 |
$text = sprintf( __( 'One or more characters used to suffix a truncated (ie. shortened) text string (default is three dots "%s").', 'wpsso' ), $def_title_sep ); |
| 88 |
|
| 89 |
break; |
| 90 |
|
| 91 |
case 'tooltip-og_desc_hashtags': // Description Hashtags. |
| 92 |
|
| 93 |
$text = __( 'The maximum number of WordPress tag names (automatically converted to hashtags) to include in the Facebook / Open Graph and X (Twitter) Card descriptions.', 'wpsso' ) . ' '; |
| 94 |
|
| 95 |
$text .= __( 'Select "0" to disable the addition of hashtags.', 'wpsso' ); |
| 96 |
|
| 97 |
break; |
| 98 |
|
| 99 |
/* |
| 100 |
* SSO > General Settings > Images tab. |
| 101 |
*/ |
| 102 |
case 'tooltip-og_img_max': // Maximum Images to Include. |
| 103 |
|
| 104 |
$text = __( 'The maximum number of images to include for the webpage meta tags and Schema markup.', 'wpsso' ) . ' '; |
| 105 |
|
| 106 |
$text .= __( 'If you select "0", then no images will be included (not recommended).', 'wpsso' ) . ' '; |
| 107 |
|
| 108 |
$text .= __( 'If no images are available in the Open Graph meta tags, social sites may choose any random image from the webpage, including headers, thumbnails, ads, etc.', 'wpsso' ); |
| 109 |
|
| 110 |
break; |
| 111 |
|
| 112 |
case 'tooltip-og_img_size': // Open Graph (Facebook and oEmbed) Image Size. |
| 113 |
|
| 114 |
$def_img_dims = $this->get_def_img_dims( 'og' ); |
| 115 |
|
| 116 |
$text = sprintf( __( 'The dimensions used for the Facebook / Open Graph and oEmbed images (default dimensions are %s).', 'wpsso' ), $def_img_dims ) . ' '; |
| 117 |
|
| 118 |
$text .= $this->fb_prefs_transl; |
| 119 |
|
| 120 |
break; |
| 121 |
|
| 122 |
case 'tooltip-og_def_img_id': // Default Image ID. |
| 123 |
|
| 124 |
$text = __( 'An image ID for your site\'s default image (ie. when an image is required, and no other image is available).', 'wpsso' ) . ' '; |
| 125 |
|
| 126 |
$text .= __( 'The default image is used for archive pages (ie. blog, category, and tag archive page) and a fallback for public posts and pages that do not have a suitable image featured, attached, or in their content.', 'wpsso' ) . ' '; |
| 127 |
|
| 128 |
$text .= '<em>' . __( 'This option is disabled if a custom image URL is entered.', 'wpsso' ) . '</em>'; |
| 129 |
|
| 130 |
break; |
| 131 |
|
| 132 |
case 'tooltip-og_def_img_url': // or Default Image URL. |
| 133 |
|
| 134 |
$limit_min_width = $this->p->cf[ 'head' ][ 'limit_min' ][ 'og_img_width' ]; |
| 135 |
$limit_min_height = $this->p->cf[ 'head' ][ 'limit_min' ][ 'og_img_height' ]; |
| 136 |
|
| 137 |
$text = __( 'You can enter a default image URL instead of choosing an image ID.', 'wpsso' ) . ' '; |
| 138 |
|
| 139 |
$text .= __( 'The image URL option allows you to choose an image outside of the WordPress Media Library and/or a smaller logo style image.', 'wpsso' ) . ' '; |
| 140 |
|
| 141 |
$text .= sprintf( __( 'The image should be at least %s or more in width and height.', 'wpsso' ), $limit_min_width . 'x' . $limit_min_height . 'px' ) . ' '; |
| 142 |
|
| 143 |
$text .= __( 'The default image is used for archive pages (ie. blog, category, and tag archive page) and a fallback for public posts and pages that do not have a suitable image featured, attached, or in their content.', 'wpsso' ) . ' '; |
| 144 |
|
| 145 |
$text .= '<em>' . __( 'This option is disabled if a custom image ID is selected.', 'wpsso' ) . '</em>'; |
| 146 |
|
| 147 |
break; |
| 148 |
|
| 149 |
/* |
| 150 |
* SSO > General Settings > Videos tab. |
| 151 |
*/ |
| 152 |
case 'tooltip-og_vid_max': // Maximum Videos to Include. |
| 153 |
|
| 154 |
$text = __( 'The maximum number of embedded videos to include in meta tags and Schema markup.', 'wpsso' ); |
| 155 |
|
| 156 |
break; |
| 157 |
|
| 158 |
case 'tooltip-og_vid_prev_img': // Include Video Preview Images. |
| 159 |
|
| 160 |
$text = __( 'Include video preview images in meta tags and Schema markup.', 'wpsso' ) . ' '; |
| 161 |
|
| 162 |
$text .= __( 'When video preview images are enabled and a preview image is available, it will be included in meta tags and Schema markup before any other image (custom, featured, attached, or content image).', 'wpsso' ); |
| 163 |
|
| 164 |
break; |
| 165 |
|
| 166 |
case 'tooltip-og_vid_autoplay': // Force Autoplay when Possible. |
| 167 |
|
| 168 |
$text = __( 'If possible, add or modify the video URL "autoplay" argument for videos in meta tags and Schema markup.', 'wpsso' ) . ' '; |
| 169 |
|
| 170 |
$text .= __( 'Video URLs from Vimeo and Wistia allow for an autoplay argument.', 'wpsso' ); |
| 171 |
|
| 172 |
break; |
| 173 |
|
| 174 |
/* |
| 175 |
* SSO > Advanced Settings > Document Types > Open Graph tab. |
| 176 |
*/ |
| 177 |
case 'tooltip-og_type_for_home_page': // Type for Page Homepage. |
| 178 |
|
| 179 |
$def_type = $this->p->opt->get_defaults( 'og_type_for_home_page' ); |
| 180 |
|
| 181 |
// translators: %s is the markup standard name (ie. Open Graph or Schema). |
| 182 |
$text = sprintf( __( 'Select a default %s type for a static front page.', 'wpsso' ), 'Open Graph' ) . ' '; |
| 183 |
|
| 184 |
// translators: %1$s is the markup standard name (ie. Open Graph or Schema) and %2$s is the type name. |
| 185 |
$text .= sprintf( __( 'The default %1$s type is "%2$s".', 'wpsso' ), 'Open Graph', $def_type ); |
| 186 |
|
| 187 |
break; |
| 188 |
|
| 189 |
case 'tooltip-og_type_for_home_posts': // Type for Posts Homepage. |
| 190 |
|
| 191 |
$def_type = $this->p->opt->get_defaults( 'og_type_for_home_posts' ); |
| 192 |
|
| 193 |
// translators: %s is the markup standard name (ie. Open Graph or Schema). |
| 194 |
$text = sprintf( __( 'Select a default %s type for a blog (non-static) front page.', 'wpsso' ), 'Open Graph' ) . ' '; |
| 195 |
|
| 196 |
// translators: %1$s is the markup standard name (ie. Open Graph or Schema) and %2$s is the type name. |
| 197 |
$text .= sprintf( __( 'The default %1$s type is "%2$s".', 'wpsso' ), 'Open Graph', $def_type ); |
| 198 |
|
| 199 |
break; |
| 200 |
|
| 201 |
case 'tooltip-og_type_for_user_page': // Type for User / Author. |
| 202 |
|
| 203 |
$def_type = $this->p->opt->get_defaults( 'og_type_for_user_page' ); |
| 204 |
|
| 205 |
// translators: %s is the markup standard name (ie. Open Graph or Schema). |
| 206 |
$text = sprintf( __( 'Select a default %s type for user / author profile pages.', 'wpsso' ), 'Open Graph' ) . ' '; |
| 207 |
|
| 208 |
// translators: %1$s is the markup standard name (ie. Open Graph or Schema) and %2$s is the type name. |
| 209 |
$text .= sprintf( __( 'The default %1$s type is "%2$s".', 'wpsso' ), 'Open Graph', $def_type ); |
| 210 |
|
| 211 |
break; |
| 212 |
|
| 213 |
case 'tooltip-og_type_for_search_page': // Type for Search Results. |
| 214 |
|
| 215 |
$def_type = $this->p->opt->get_defaults( 'og_type_for_search_page' ); |
| 216 |
|
| 217 |
// translators: %s is the markup standard name (ie. Open Graph or Schema). |
| 218 |
$text = sprintf( __( 'Select a default %s type for search results pages.', 'wpsso' ), 'Open Graph' ) . ' '; |
| 219 |
|
| 220 |
// translators: %1$s is the markup standard name (ie. Open Graph or Schema) and %2$s is the type name. |
| 221 |
$text .= sprintf( __( 'The default %1$s type is "%2$s".', 'wpsso' ), 'Open Graph', $def_type ); |
| 222 |
|
| 223 |
break; |
| 224 |
|
| 225 |
case 'tooltip-og_type_for_archive_page': // Type for Archive Page. |
| 226 |
|
| 227 |
$def_type = $this->p->opt->get_defaults( 'og_type_for_archive_page' ); |
| 228 |
|
| 229 |
// translators: %s is the markup standard name (ie. Open Graph or Schema). |
| 230 |
$text = sprintf( __( 'Select a default %s type for other archive pages (date-based archive pages, for example).', 'wpsso' ), 'Open Graph' ) . ' '; |
| 231 |
|
| 232 |
// translators: %1$s is the markup standard name (ie. Open Graph or Schema) and %2$s is the type name. |
| 233 |
$text .= sprintf( __( 'The default %1$s type is "%2$s".', 'wpsso' ), 'Open Graph', $def_type ); |
| 234 |
|
| 235 |
break; |
| 236 |
|
| 237 |
case 'tooltip-og_type_for_pt': // Type by Post Type. |
| 238 |
|
| 239 |
// translators: %s is the markup standard name (ie. Open Graph or Schema). |
| 240 |
$text = sprintf( __( 'Select a default %s type for each post type.', 'wpsso' ), 'Open Graph' ) . ' '; |
| 241 |
|
| 242 |
$text .= __( 'Please note that each Open Graph type has a unique set of meta tags, so by selecting "website" here (for example), you would be excluding all "article" related meta tags (<code>article:author</code>, <code>article:section</code>, etc.).', 'wpsso' ); |
| 243 |
|
| 244 |
break; |
| 245 |
|
| 246 |
case 'tooltip-og_type_for_pta': // Type by Post Type Archive. |
| 247 |
|
| 248 |
$def_type = $this->p->opt->get_defaults( 'og_type_for_archive_page' ); |
| 249 |
|
| 250 |
// translators: %s is the markup standard name (ie. Open Graph or Schema). |
| 251 |
$text = sprintf( __( 'Select a default %s type for each post type archive.', 'wpsso' ), 'Open Graph' ) . ' '; |
| 252 |
|
| 253 |
// translators: %1$s is the markup standard name (ie. Open Graph or Schema) and %2$s is the type name. |
| 254 |
$text .= sprintf( __( 'The default %1$s type is "%2$s".', 'wpsso' ), 'Open Graph', $def_type ); |
| 255 |
|
| 256 |
break; |
| 257 |
|
| 258 |
case 'tooltip-og_type_for_tax': // Type by Taxonomy. |
| 259 |
|
| 260 |
$def_type = $this->p->opt->get_defaults( 'og_type_for_archive_page' ); |
| 261 |
|
| 262 |
// translators: %s is the markup standard name (ie. Open Graph or Schema). |
| 263 |
$text = sprintf( __( 'Select a default %s type for each taxonomy.', 'wpsso' ), 'Open Graph' ) . ' '; |
| 264 |
|
| 265 |
// translators: %1$s is the markup standard name (ie. Open Graph or Schema) and %2$s is the type name. |
| 266 |
$text .= sprintf( __( 'The default %1$s type is "%2$s".', 'wpsso' ), 'Open Graph', $def_type ); |
| 267 |
|
| 268 |
break; |
| 269 |
|
| 270 |
default: |
| 271 |
|
| 272 |
$text = apply_filters( 'wpsso_messages_tooltip_og', $text, $msg_key, $info ); |
| 273 |
|
| 274 |
break; |
| 275 |
|
| 276 |
} // End of 'tooltip-og' switch. |
| 277 |
|
| 278 |
return $text; |
| 279 |
} |
| 280 |
} |
| 281 |
} |
| 282 |
|