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
wpsso / lib / messages-info.php

messages-info.php in WPSSO Core – Complete Schema Markup and Meta Tags 22.7.0, at lib/messages-info.php

289 lines 11.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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( 'WpssoMessagesInfo' ) ) {
19
20 /*
21 * Instantiated by WpssoMessages->get() only when needed.
22 */
23 class WpssoMessagesInfo extends WpssoMessages {
24
25 private $meta = null; // WpssoMessagesInfoMeta class object.
26
27 public function get( $msg_key = false, $info = array() ) {
28
29 $this->maybe_set_properties();
30
31 $text = '';
32
33 if ( 0 === strpos( $msg_key, 'info-meta-' ) ) {
34
35 /*
36 * Instantiate WpssoMessagesInfoMeta only when needed.
37 */
38 if ( null === $this->meta ) {
39
40 require_once WPSSO_PLUGINDIR . 'lib/messages-info-meta.php';
41
42 $this->meta = new WpssoMessagesInfoMeta( $this->p );
43 }
44
45 return $this->meta->get( $msg_key, $info );
46 }
47
48 switch ( $msg_key ) {
49
50 case 'info-plugin-tid':
51
52 $um_info = $this->p->cf[ 'plugin' ][ 'wpssoum' ];
53 $um_info_name = _x( $um_info[ 'name' ], 'plugin name', 'wpsso' );
54 $um_addon_link = $this->p->util->get_admin_url( 'addons#wpssoum', $um_info_name );
55
56 $text = '<blockquote class="top-info">';
57
58 $text .= '<p>';
59
60 $text .= sprintf( __( 'After purchasing a %1$s license pack, you will receive an email with installation instructions and your unique Authentication ID for that license pack.', 'wpsso' ), $this->p_name_pro, $this->pkg_pro_transl ) . ' ';
61
62 $text .= '</p><p>';
63
64 $text .= sprintf( __( 'As mentioned in the installation instructions, don\'t forget that the %1$s add-on must be active to enable %2$s features and get %2$s updates.', 'wpsso' ), $um_addon_link, $this->pkg_pro_transl );
65
66 $text .= '</p>';
67
68 $text .= '</blockquote>';
69
70 break;
71
72 case 'info-plugin-tid-network':
73
74 $um_info = $this->p->cf[ 'plugin' ][ 'wpssoum' ];
75 $um_info_name = _x( $um_info[ 'name' ], 'plugin name', 'wpsso' );
76 $licenses_page_link = $this->p->util->get_admin_url( 'licenses', _x( 'Premium Licenses', 'lib file description', 'wpsso' ) );
77
78 $text = '<blockquote class="top-info">';
79
80 $text .= '<p>';
81
82 $text .= sprintf( __( 'After purchasing a %1$s license pack, you will receive an email with %2$s installation instructions and your unique Authentication ID for the license pack.', 'wpsso' ), $this->p_name_pro, $this->pkg_pro_transl ) . ' ';
83
84 $text .= sprintf( __( 'You may enter the Authentication ID in this settings page to define a value for all sites within the network, or enter the Authentication ID individually in each site\'s %1$s settings page.', 'wpsso' ), $licenses_page_link ) . ' ';
85
86 $text .= sprintf( __( 'If you enter an Authentication ID in this settings page, make sure you have purchased enough licenses for all sites within the network - for example, to license the %1$s plugin for 10 sites, you would need an Authentication ID for a 10 license pack or better.', 'wpsso' ), $this->p_name_pro ) . ' ';
87
88 $text .= '</p><p>';
89
90 $text .= sprintf( __( 'WordPress uses the default blog (ie. BLOG_ID_CURRENT_SITE) to manage updates in the network admin interface, which means the default blog must be licensed to install %1$s updates.', 'wpsso' ), $this->pkg_pro_transl ) . ' ';
91
92 $text .= sprintf( __( 'To update the %1$s plugin, make sure the %2$s add-on is active on the default blog, and the default blog is licensed.', 'wpsso' ), $this->p_name_pro, $um_info_name );
93
94 $text .= '</p>';
95
96 $text .= '</blockquote>';
97
98 break;
99
100 case 'info-contact_fields':
101
102 // translators: Please ignore - translation uses a different text domain.
103 $section_label = __( 'Contact Info' );
104 $profile_page_url = get_admin_url( $blog_id = null, 'profile.php' );
105
106 $text = '<blockquote class="top-info">';
107
108 $text .= '<p>';
109
110 $text .= sprintf( __( 'These options allow you to customize contact fields shown in the "%1$s" section of <a href="%2$s">the user profile page</a>.', 'wpsso' ), $section_label, $profile_page_url ) . ' ';
111
112 $text .= __( 'Contact information from the user profile can be included in meta tags and Schema markup.', 'wpsso' ) . ' ';
113
114 $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> ';
115
116 $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' ) ) . ' ';
117
118 $text .= '</p> <p>';
119
120 $text .= '<center>';
121
122 $text .= '<strong>' . __( 'Do not enter your contact information here &ndash; these options are for contact field ids and labels only.', 'wpsso' ) . '</strong><br/>';
123
124 $text .= sprintf( __( 'Enter your personal contact information in <a href="%s">the user profile page</a>.', 'wpsso' ), $profile_page_url );
125
126 $text .= '</center>';
127
128 $text .= '</p>';
129
130 $text .= '</blockquote>';
131
132 break;
133
134 case 'info-user-about':
135
136 // translators: Please ignore - translation uses a different text domain.
137 $section_label = __( 'About Yourself' );
138 $profile_page_url = get_admin_url( $blog_id = null, 'profile.php' );
139
140 $text = '<blockquote class="top-info"><p>';
141
142 $text .= sprintf( __( 'These options allow you to customize additional fields shown in the "%1$s" section of <a href="%2$s">the user profile page</a>.', 'wpsso' ), $section_label, $profile_page_url ) . ' ';
143
144 $text .= __( 'This additional user profile information can be included in meta tags and Schema markup.', 'wpsso' ) . ' ';
145
146 $text .= '</blockquote>';
147
148 break;
149
150 case 'info-product-attrs':
151
152 $text = '<blockquote class="top-info"><p>';
153
154 $text .= sprintf( __( 'These options allow you to customize product attribute names (aka attribute labels) that %s can use to request additional product information from your e-commerce plugin.', 'wpsso' ), $this->p_name ) . ' ';
155
156 $text .= __( 'Note that these are product attribute names that you can create in your e-commerce plugin and not their values.', 'wpsso' ) . ' ';
157
158 $text .= '</p> <p><center><strong>';
159
160 $text .= __( 'Do not enter product attribute values here &ndash; these options are for product attribute names only.', 'wpsso' );
161
162 $text .= '</strong><br/>';
163
164 $text .= __( 'You can create the following product attribute names and enter their corresponding values in your e-commerce plugin.', 'wpsso' );
165
166 $text .= '</center></p>';
167
168 if ( ! empty( $this->p->avail[ 'ecom' ][ 'woocommerce' ] ) ) {
169
170 $wcmd_info = $this->p->cf[ 'plugin' ][ 'wpssowcmd' ];
171 $wcmd_name_transl = _x( $wcmd_info[ 'name' ], 'plugin name', 'wpsso' );
172 $wcmd_addons_link = $this->p->util->get_admin_url( 'addons#wpssowcmd', $wcmd_name_transl );
173 // translators: Please ignore - translation uses a different text domain.
174 $used_for_variations = __( 'Used for variations', 'woocommerce' );
175
176 $text .= '<p><center><strong>';
177
178 $text .= __( 'An active WooCommerce plugin has been detected.', 'wpsso' );
179
180 $text .= '</strong></br>';
181
182 $text .= sprintf( __( 'See the %s documentation for information on creating and managing product attributes in WooCommerce.', 'wpsso' ), '<a href="https://woocommerce.com/document/managing-product-taxonomies/">' . __( 'Managing Product Categories, Tags and Attributes', 'wpsso' ) . '</a>' ) . ' ';
183
184 $text .= __( 'Note that WooCommerce creates a selector on the purchase page for product attributes used for variations.', 'wpsso' ) . ' ';
185
186 $text .= sprintf( __( 'Using the WooCommerce "%s" option may not be suitable for unique product IDs (like GTIN, ISBN, and MPN).', 'wpsso' ), $used_for_variations ) . ' ';
187
188 $text .= sprintf( __( 'You should activate the %s add-on if you don\'t already have a plugin to manage unique product identifiers for WooCommerce.', 'wpsso' ), $wcmd_addons_link ) . ' ';
189
190 $text .= '</center></p>';
191 }
192
193 $text .= '</blockquote>';
194
195 break;
196
197 case 'info-custom-fields':
198
199 $text = '<blockquote class="top-info">';
200
201 $text .= '<p>';
202
203 $text .= sprintf( __( 'These options allow you to customize the custom field names (aka metadata names) that %s can read to get additional information about the content.', 'wpsso' ), $this->p_name ) . ' ';
204
205 $text .= __( 'Custom fields are often used by plugins and themes to store additional data, but can also be created manually using the WordPress Custom Fields metabox (enabled in the block editor preferences).', 'wpsso' ) . ' ';
206
207 $text .= sprintf( __( 'Custom field names and their values (for comments, posts, terms, and/or users) can be <a href="%s">shown by activating these plugins</a>.', 'wpsso' ), 'https://wordpress.org/plugins/search/jsm+show+metadata/' ) . ' ';
208
209 $text .= sprintf( __( 'Developers should note that the %1$s filters are applied before the %2$s and %3$s filters.', 'wpsso' ), '<code>wpsso_import_cf_{custom_field_name}</code>', '<code>wpsso_get_md_options</code>', '<code>wpsso_get_{comment|post|term|user}_options</code>' ) . ' ';
210
211 $text .= '</p> <p><center><strong>';
212
213 $text .= __( 'Do not enter custom field values here &ndash; these options are for custom field names only.', 'wpsso' ) . ' ';
214
215 $text .= '</strong><br/>';
216
217 $text .= __( 'Use the following custom field names when creating custom fields for your posts, pages, and custom post types.', 'wpsso' ) . ' ';
218
219 $text .= '</center></p>';
220
221 if ( ! empty( $this->p->avail[ 'ecom' ][ 'woocommerce' ] ) ) {
222
223 $text .= '<p><center><strong>';
224
225 $text .= __( 'An active WooCommerce plugin has been detected.', 'wpsso' ) . ' ';
226
227 $text .= '</strong></br>';
228
229 $text .= __( 'Note that product attributes from WooCommerce have precedence over custom field values.', 'wpsso' ) . ' ';
230
231 $text .= __( 'We suggest using a supported third-party plugin to manage Brand, GTIN, ISBN, and MPN values for variations.', 'wpsso' ) . ' ';
232
233 $text .= '</center></p>';
234 }
235
236 $text .= '</blockquote>';
237
238 break;
239
240 case 'info-head_tags':
241
242 $text = '<blockquote class="top-info">';
243
244 $text .= '<p>';
245
246 // translators: %1$s is "link rel canonical", %2$s is "meta name description", and %3$s is "meta name robots".
247 $text .= sprintf( __( 'Note that the %1$s, %2$s, and %3$s tags are disabled automatically if another known SEO plugin is detected.', 'wpsso' ), '<code>link rel canonical</code>', '<code>meta name description</code>', '<code>meta name robots</code>' );
248
249 $text .= '</p>';
250
251 $text .= '</blockquote>';
252
253 break;
254
255 case 'info-image_dimensions':
256
257 $tools_page_link = $this->p->util->get_admin_url( 'tools', _x( 'Tools and Actions', 'lib file description', 'wpsso' ) );
258
259 $text = '<blockquote class="top-info">';
260
261 $text .= '<p>';
262
263 $text .= sprintf( __( '%s and WordPress create image files for social sites and search engines based on the following image dimensions and crop settings.', 'wpsso' ), $info[ 'short' ] ) . ' ';
264
265 $text .= __( 'Image sizes that use the same dimensions and crop settings will create just one image file.', 'wpsso' ) . ' ';
266
267 $text .= sprintf( __( 'The default dimensions and crop settings from %1$s create only %2$s image files from an original full size image (provided the original image is large enough or image upscaling has been enabled).', 'wpsso' ), $info[ 'short' ], __( 'five', 'wpsso' ) ) . ' ';
268
269 $text .= sprintf( __( 'You can reload the default image sizes from the %s settings page.', 'wpsso' ), $tools_page_link ) . ' ';
270
271 $text .= '</p>';
272
273 $text .= '</blockquote>';
274
275 break;
276
277 default:
278
279 $text = apply_filters( 'wpsso_messages_info', $text, $msg_key, $info );
280
281 break;
282
283 } // End of 'info' switch.
284
285 return $text;
286 }
287 }
288 }
289