PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.7.2
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.7.2
2.7.1 2.7.2 2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 All 141 releases
← All changes | includes/class-metasync-settings-fields.php +100 -68 2.7.0 → 2.7.2 View file →
@@ -53,8 +53,16 @@
53 53 // writes — silently disappear from the page.
54 54 require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-metasync-seo-sync-settings.php';
55 55
56 56 $sections = array(
57 + 'analytics' => array(
58 + 'title' => 'Usage Data & Product Improvement',
59 + 'description' => 'Choose whether to share limited usage data to help improve MetaSync',
60 + 'icon' => 'chart-bar',
61 + 'priority' => 70,
62 + 'default_open' => false,
63 + 'render_callback' => array($this, 'render_analytics_section'),
64 + ),
57 65 'connection' => array(
58 66 'title' => 'Connection & Authentication',
59 67 'description' => 'Manage your API connection and authentication settings',
60 68 'icon' => 'admin-network',
@@ -75,11 +83,8 @@
75 83 'otto_pixel_uuid',
76 84 'otto_disable_on_loggedin',
77 85 'otto_disable_preview_button',
78 86 'seo_priority',
79 - 'otto_wp_rocket_compat',
80 - 'otto_sg_optimizer_compat',
81 - 'bookingpress_session_compat',
82 87 )
83 88 ),
84 89 'edge_cache' => array(
85 90 'title' => 'Edge Cache / CDN',
@@ -180,9 +185,8 @@
180 185 'fields' => array(
181 186 'permalink_structure',
182 187 'hide_dashboard_framework',
183 188 'show_admin_bar_status',
184 - 'enable_auto_updates',
185 189 'import_external_data'
186 190 )
187 191 )
188 192 );
@@ -304,9 +308,9 @@
304 308 $content_state = $is_open ? 'open' : 'closed';
305 309
306 310 echo '<div class="metasync-accordion-section" data-section="' . esc_attr($section_key) . '">';
307 311
308 - echo '<div class="metasync-accordion-header" role="button" tabindex="0" aria-expanded="' . $aria_expanded . '" aria-controls="' . $section_id . '">';
312 + echo '<div class="metasync-accordion-header" role="button" tabindex="0" aria-expanded="' . esc_attr($aria_expanded) . '" aria-controls="' . esc_attr($section_id) . '">';
309 313 echo '<div class="metasync-accordion-title">';
310 314 echo '<span class="metasync-accordion-icon"><span class="dashicons dashicons-' . esc_attr($section_data['icon']) . '"></span></span>';
311 315 echo '<div class="metasync-accordion-text">';
312 316 echo '<h3>' . esc_html($section_data['title']) . '</h3>';
@@ -317,9 +321,9 @@
317 321 echo '<span class="toggle-icon">▼</span>';
318 322 echo '</button>';
319 323 echo '</div>';
320 324
321 - echo '<div class="metasync-accordion-content" id="' . $section_id . '" data-state="' . $content_state . '">';
325 + echo '<div class="metasync-accordion-content" id="' . esc_attr($section_id) . '" data-state="' . esc_attr($content_state) . '">';
322 326
323 327 if (isset($section_data['render_callback']) && is_callable($section_data['render_callback'])) {
324 328 call_user_func($section_data['render_callback']);
325 329 }
@@ -341,9 +345,8 @@
341 345 </h4>
342 346 <p style="color: var(--dashboard-text-secondary); margin: 0 0 12px 0;">This action will permanently delete:</p>
343 347 <ul style="color: var(--dashboard-text-secondary); margin: 0 0 12px 20px; line-height: 1.8;">
344 348 <li>All API keys and authentication tokens</li>
345 - <li>White label branding settings</li>
346 349 <li>Plugin configuration and preferences</li>
347 350 <li>Instant indexing settings</li>
348 351 <li>Media optimization settings and cache</li>
349 352 <li>Code minification settings</li>
@@ -348,9 +351,9 @@
348 351 <li>Media optimization settings and cache</li>
349 352 <li>Code minification settings</li>
350 353 <li>All cached data and crawl information</li>
351 354 </ul>
352 - <p style="color: var(--dashboard-warning, #f59e0b); margin: 0; font-weight: 600;">You will need to reconfigure the plugin completely after this reset.</p>
355 + <p style="color: var(--dashboard-warning, #f59e0b); margin: 0; font-weight: 600;">You will need to reconfigure the plugin's operational settings after this reset.</p>
353 356 </div>
354 357 <form method="post" action="" onsubmit="return confirmClearSettings(event)">
355 358 <?php wp_nonce_field('metasync_clear_all_settings_nonce', 'clear_all_settings_nonce'); ?>
356 359 <input type="hidden" name="clear_all_settings" value="yes" />
@@ -390,9 +393,9 @@
390 393 if (!firstConfirm) {
391 394 return false;
392 395 }
393 396
394 - var secondConfirm = confirm("🚨 FINAL WARNING 🚨\n\nThis will delete:\n• All API keys and authentication tokens\n• White label branding settings\n• Plugin configuration and preferences\n• Instant indexing settings\n• Media optimization settings and cache\n• Code minification settings\n• All cached data\n\nYou will need to reconfigure the entire plugin from scratch.\n\nType 'DELETE' in the next prompt to confirm.");
397 + var secondConfirm = confirm("🚨 FINAL WARNING 🚨\n\nThis will delete:\n• All API keys and authentication tokens\n• Plugin configuration and preferences\n• Instant indexing settings\n• Media optimization settings and cache\n• Code minification settings\n• All cached data\n\nYou will need to reconfigure the plugin's operational settings from scratch.\n\nType 'DELETE' in the next prompt to confirm.");
395 398 if (!secondConfirm) {
396 399 return false;
397 400 }
398 401
@@ -413,9 +416,9 @@
413 416 if (!function_exists('google_index_direct')) {
414 417 if (file_exists(plugin_dir_path(dirname(__FILE__)) . 'google-index/google-index-init.php')) {
415 418 require_once plugin_dir_path(dirname(__FILE__)) . 'google-index/google-index-init.php';
416 419 } else {
417 - error_log('MetaSync Google Index: google-index-init.php not found at ' . plugin_dir_path(dirname(__FILE__)) . 'google-index/google-index-init.php');
420 + error_log('MetaSync Google Index: google-index-init.php not found at ' . plugin_dir_path(dirname(__FILE__)) . 'google-index/google-index-init.php'); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- genuine failure path, bounded, no secrets
418 421 return;
419 422 }
420 423 }
421 424
@@ -703,9 +706,9 @@
703 706 <p style="color: var(--dashboard-text-secondary); margin: 0 0 20px 0;">
704 707 Select which user roles can see and access this plugin's menu, settings, and options in the WordPress admin area.
705 708 </p>
706 709
707 - <form method="post" action="<?php echo admin_url('admin.php?page=' . Metasync_Admin::$page_slug . '&tab=advanced'); ?>" id="plugin-access-roles-form">
710 + <form method="post" action="<?php echo esc_url(admin_url('admin.php?page=' . Metasync_Admin::$page_slug . '&tab=advanced')); ?>" id="plugin-access-roles-form">
708 711 <?php wp_nonce_field('metasync_plugin_access_roles_nonce', 'plugin_access_roles_nonce'); ?>
709 712 <input type="hidden" name="save_plugin_access_roles" value="yes" />
710 713
711 714 <div class="metasync-role-selector-container" style="background: var(--dashboard-card-bg-alt, rgba(255,255,255,0.05)); border: 1px solid var(--dashboard-border); border-radius: 8px; padding: 16px; max-height: 300px; overflow-y: auto;">
@@ -823,9 +826,9 @@
823 826
824 827 public function can_change_memory_limit() {
825 828 $current_limit = ini_get('memory_limit');
826 829
827 - $test_result = @ini_set('memory_limit', $current_limit);
830 + $test_result = @ini_set('memory_limit', $current_limit); // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Discouraged -- runtime PHP setting with no WordPress API
828 831
829 832 return $test_result !== false;
830 833 }
831 834
@@ -877,9 +880,9 @@
877 880 }
878 881
879 882 $memory_limit_mb = $this->get_execution_setting('max_memory_limit');
880 883
881 - $result = @ini_set('memory_limit', $memory_limit_mb . 'M');
884 + $result = @ini_set('memory_limit', $memory_limit_mb . 'M'); // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Discouraged -- runtime PHP setting with no WordPress API
882 885
883 886 return $result !== false;
884 887 }
885 888
@@ -1131,9 +1134,9 @@
1131 1134 'apikey' => sprintf('Auto-generated authentication token used for secure API communication between your WordPress site and %s services. You can refresh this token if needed for security purposes.', $plugin_name),
1132 1135 'otto_pixel_uuid' => sprintf('Your unique %s tracking pixel identifier. This UUID is used to track %s modifications and analytics on your website pages.', $otto_name, $otto_name),
1133 1136 'otto_disable_on_loggedin' => sprintf('Disable %s modifications when you are logged in to WordPress. This allows you to see and edit the original content without %s\'s enhancements during editing sessions.', $otto_name, $otto_name),
1134 1137 'otto_disable_preview_button' => sprintf('Hide the %s frontend toolbar that displays the status indicator, preview button, and debug button. Enable this for a cleaner frontend experience.', $otto_name),
1135 - 'seo_priority' => sprintf('Choose which value appears first on a page when both your custom SEO value and an approved %s suggestion are available. This changes what visitors see; it does not delete or overwrite saved values.', $otto_name),
1138 + 'seo_priority' => sprintf('Choose which value appears first on a page when both your custom SEO value (title, description or focus keyword, edited on the post/page screen) and an approved %s suggestion are available. This changes what visitors see; it does not delete or overwrite saved values.', $otto_name),
1136 1139 'otto_wp_rocket_compat' => sprintf('WP Rocket Compatibility Mode: Controls how %s interacts with WP Rocket. "Auto" (recommended) allows both to work together by avoiding DONOTCACHEPAGE constant unless necessary for Brizy pages or SG Optimizer conflicts. This ensures WP Rocket\'s JavaScript delay and optimization features continue working.', $otto_name),
1137 1140 'otto_sg_optimizer_compat' => sprintf('SiteGround Optimizer Compatibility Mode: Controls how %s renders on SiteGround hosting. "Auto" (recommended) uses the internal HTTP fetch, which protects themes that defer inline CSS to the footer (e.g. Divi). "Buffer Mode" renders in-process with no internal fetch — faster on sites whose pages can never be host-cached, for example when a plugin starts a PHP session on every request (BookingPress sessions are removed automatically, so this does not apply to them).', $otto_name),
1138 1141 'bookingpress_session_compat' => 'BookingPress Session Compatibility: Controls whether MetaSync removes the PHP session BookingPress starts on every public page, so hosts such as SiteGround can page-cache the site again.',
1139 1142 'otto_disable_for_bots' => sprintf('Enable bot detection to automatically skip %s processing for search engine crawlers, SEO tools, and other bots. This reduces unnecessary API calls and improves performance.', $otto_name),
@@ -1152,9 +1155,8 @@
1152 1155 'content_genius_sync_roles' => 'Select which WordPress user roles should be synchronized with Content Genius. This determines which users will have their profiles and permissions synced for content collaboration.',
1153 1156 'permalink_structure' => sprintf('Displays your current WordPress permalink structure. %s works best with pretty permalinks (not "Plain"). If you see a warning, visit Settings > Permalinks to change your structure.', $plugin_name),
1154 1157 'hide_dashboard_framework' => sprintf('Hide the main %s dashboard from the WordPress admin menu. This is useful if you want to reduce menu clutter but still keep the plugin active.', $plugin_name),
1155 1158 'show_admin_bar_status' => sprintf('Display the %s status indicator in the WordPress admin bar at the top of your screen. This provides quick visibility of plugin status and key metrics.', $plugin_name),
1156 - 'enable_auto_updates' => sprintf('Allow WordPress to automatically update the %s plugin when new versions are released. Recommended for security patches, but you may prefer manual updates for major versions.', $plugin_name),
1157 1159 'import_external_data' => sprintf('Import your existing SEO settings and metadata from other popular SEO plugins like Yoast, Rank Math, or All in One SEO. This makes migration to %s seamless without losing your SEO data.', $plugin_name),
1158 1160 'import_seo_metadata' => sprintf('Migrate your existing SEO titles and meta descriptions from Yoast, Rank Math, or All in One SEO. This one-click import preserves your search rankings by copying your optimized meta data to %s, even if the source plugin is deactivated.', $plugin_name),
1159 1161 'default_page_builder' => 'Choose how Content Genius stores synced articles. "Gutenberg" works with all themes and page builders. Selecting a specific builder converts content to that builder\'s widget format, which inherits the builder\'s global typography and layout styles.',
1160 1162 'og_image_dimensions' => 'Adds your share image\'s width, height, and file type to the Open Graph tags so Facebook, LinkedIn, and others render your preview instantly at the right size instead of guessing. Leave on unless another plugin already outputs these.',
@@ -1165,8 +1167,35 @@
1165 1167 'twitter_image_alt' => 'Adds descriptive alt text to the image shown when your page is shared on X/Twitter, improving accessibility for screen-reader users. Uses your saved alt text or the image\'s own alt attribute.'
1166 1168 );
1167 1169 }
1168 1170
1171 + public function render_analytics_section() {
1172 + $enabled = get_option('metasync_analytics_opt_in', 'no') === 'yes';
1173 + $plugin_name = Metasync::get_effective_plugin_name();
1174 + /* translators: %s: Plugin name. */
1175 + $heading = sprintf(__('Help improve %s', 'metasync'), $plugin_name);
1176 + /* translators: %s: Plugin name. */
1177 + $intro = sprintf(__('Allow %s to collect limited usage analytics. This helps us understand which features are used, improve the product, and identify problems.', 'metasync'), $plugin_name);
1178 + /* translators: %s: Plugin name. */
1179 + $toggle_label = sprintf(__('Share usage data with %s', 'metasync'), $plugin_name);
1180 + ?>
1181 + <div class="metasync-analytics-consent-card">
1182 + <div class="metasync-analytics-consent-copy">
1183 + <h3><?php echo esc_html($heading); ?></h3>
1184 + <p><?php echo esc_html($intro); ?></p>
1185 + <p class="description"><?php esc_html_e('We collect limited technical information such as your site URL, plugin version, WordPress and PHP versions, user role, and feature usage. We do not collect passwords, API keys, customer content, names, or email addresses.', 'metasync'); ?></p>
1186 + </div>
1187 + <label class="metasync-consent-switch" for="metasync_analytics_opt_in">
1188 + <input type="hidden" name="metasync_analytics_opt_in" value="no" />
1189 + <input type="checkbox" id="metasync_analytics_opt_in" name="metasync_analytics_opt_in" value="yes" <?php checked($enabled); ?> />
1190 + <span class="metasync-consent-slider" aria-hidden="true"></span>
1191 + <span class="screen-reader-text"><?php echo esc_html($toggle_label); ?></span>
1192 + </label>
1193 + <span class="metasync-consent-status" aria-live="polite" data-enabled-label="<?php esc_attr_e('Enabled', 'metasync'); ?>" data-disabled-label="<?php esc_attr_e('Off', 'metasync'); ?>"><?php echo $enabled ? esc_html__('Enabled', 'metasync') : esc_html__('Off', 'metasync'); ?></span>
1194 + </div>
1195 + <?php
1196 + }
1197 +
1169 1198 public function get_field_section($field_id) {
1170 1199 $sections = $this->get_accordion_sections_config();
1171 1200
1172 1201 foreach ($sections as $section_key => $section_data) {
@@ -1200,9 +1229,9 @@
1200 1229 $content_state = $is_open ? 'open' : 'closed';
1201 1230
1202 1231 echo '<div class="metasync-accordion-section" data-section="' . esc_attr($section_key) . '">';
1203 1232
1204 - echo '<div class="metasync-accordion-header" role="button" tabindex="0" aria-expanded="' . $aria_expanded . '" aria-controls="' . $section_id . '">';
1233 + echo '<div class="metasync-accordion-header" role="button" tabindex="0" aria-expanded="' . esc_attr($aria_expanded) . '" aria-controls="' . esc_attr($section_id) . '">';
1205 1234 echo '<div class="metasync-accordion-title">';
1206 1235 echo '<span class="metasync-accordion-icon"><span class="dashicons dashicons-' . esc_attr($section_data['icon']) . '"></span></span>';
1207 1236 echo '<div class="metasync-accordion-text">';
1208 1237 echo '<h3>' . esc_html($section_data['title']) . '</h3>';
@@ -1213,9 +1242,9 @@
1213 1242 echo '<span class="toggle-icon">▼</span>';
1214 1243 echo '</button>';
1215 1244 echo '</div>';
1216 1245
1217 - echo '<div class="metasync-accordion-content" id="' . $section_id . '" data-state="' . $content_state . '">';
1246 + echo '<div class="metasync-accordion-content" id="' . esc_attr($section_id) . '" data-state="' . esc_attr($content_state) . '">';
1218 1247
1219 1248 if (isset($section_data['render_callback']) && is_callable($section_data['render_callback'])) {
1220 1249 call_user_func($section_data['render_callback']);
1221 1250 } elseif (isset($section_data['fields']) && is_array($section_data['fields'])) {
@@ -1230,9 +1259,9 @@
1230 1259 echo '<tr>';
1231 1260 echo '<th scope="row">';
1232 1261 if (!empty($field['title'])) {
1233 1262 echo '<div class="metasync-field-label-wrapper">';
1234 - echo '<label for="' . esc_attr($field['id']) . '">' . $field['title'] . '</label>';
1263 + echo '<label for="' . esc_attr($field['id']) . '">' . esc_html($field['title']) . '</label>';
1235 1264
1236 1265 if (isset($tooltips[$field_id])) {
1237 1266 echo '<button type="button" class="metasync-tooltip-trigger" data-tooltip-id="' . esc_attr($field_id) . '" aria-label="More information">';
1238 1267 echo '<svg class="metasync-info-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">';
@@ -1287,9 +1316,9 @@
1287 1316 echo '<tr>';
1288 1317 echo '<th scope="row">';
1289 1318 if (!empty($field['title'])) {
1290 1319 echo '<div class="metasync-field-label-wrapper">';
1291 - echo '<label for="' . esc_attr($field['id']) . '">' . $field['title'] . '</label>';
1320 + echo '<label for="' . esc_attr($field['id']) . '">' . esc_html($field['title']) . '</label>';
1292 1321 if (isset($llms_tooltips[$field['id']])) {
1293 1322 Metasync::render_tooltip_icon($field['id'], $llms_tooltips[$field['id']]);
1294 1323 }
1295 1324 echo '</div>';
@@ -1343,32 +1372,32 @@
1343 1372 $display_value = $current_token;
1344 1373 $status_message = 'Plugin Auth Token is active and ready for authentication.';
1345 1374 $refresh_help = 'Click refresh to generate a new token and update the heartbeat API.';
1346 1375 } else {
1347 - $display_value = 'Auto-generated when connecting to ' . esc_html(Metasync::get_effective_plugin_name());
1348 - $status_message = 'Plugin Auth Token will be automatically generated when you click "Connect to ' . esc_html(Metasync::get_effective_plugin_name()) . '".';
1376 + $display_value = 'Auto-generated when connecting to ' . Metasync::get_effective_plugin_name();
1377 + $status_message = 'Plugin Auth Token will be automatically generated when you click "Connect to ' . Metasync::get_effective_plugin_name() . '".';
1349 1378 $refresh_help = 'You can also manually generate a token by clicking refresh.';
1350 1379 }
1351 1380
1352 1381 printf('<div class="metasync-auth-token-row">');
1353 1382 printf(
1354 - '<input type="text" id="apikey" name="' . Metasync_Admin::option_key . '[general][apikey]" value="%s" size="40" class="regular-text" readonly="readonly" />',
1383 + '<input type="text" id="apikey" name="' . esc_attr(Metasync_Admin::option_key) . '[general][apikey]" value="%s" size="40" class="regular-text" readonly="readonly" />',
1355 1384 esc_attr($display_value)
1356 1385 );
1357 1386 printf('<button type="button" id="refresh-plugin-auth-token" class="button button-secondary metasync-refresh-token-btn"><span class="dashicons dashicons-controls-repeat"></span> Refresh Token</button>');
1358 1387 printf('</div>');
1359 - printf('<p class="description">%s %s</p>', $status_message, $refresh_help);
1388 + printf('<p class="description">%s %s</p>', esc_html($status_message), esc_html($refresh_help));
1360 1389 }
1361 1390
1362 1391 public function linkgraph_token_callback()
1363 1392 {
1364 1393 printf(
1365 - '<input type="text" id="linkgraph_token" name="' . Metasync_Admin::option_key . '[general][linkgraph_token]" value="%s" size="25" readonly="readonly" />',
1394 + '<input type="text" id="linkgraph_token" name="' . esc_attr(Metasync_Admin::option_key) . '[general][linkgraph_token]" value="%s" size="25" readonly="readonly" />',
1366 1395 isset(Metasync::get_option('general')['linkgraph_token']) ? esc_attr(Metasync::get_option('general')['linkgraph_token']) : ''
1367 1396 );
1368 1397
1369 1398 printf(
1370 - '<input type="text" id="linkgraph_customer_id" name="' . Metasync_Admin::option_key . '[general][linkgraph_customer_id]" value="%s" size="25" readonly="readonly" />',
1399 + '<input type="text" id="linkgraph_customer_id" name="' . esc_attr(Metasync_Admin::option_key) . '[general][linkgraph_customer_id]" value="%s" size="25" readonly="readonly" />',
1371 1400 isset(Metasync::get_option('general')['linkgraph_customer_id']) ? esc_attr(Metasync::get_option('general')['linkgraph_customer_id']) : ''
1372 1401 );
1373 1402
1374 1403 ?>
@@ -1493,9 +1522,9 @@
1493 1522 printf('• The authentication window will open in a popup - please allow popups<br/>');
1494 1523 printf('• The process typically takes 15-30 seconds to complete<br/>');
1495 1524 printf('• Your API key will be stored securely and shown masked below<br/>');
1496 1525 printf('• If you encounter issues, try disabling ad blockers temporarily<br/>');
1497 - printf('• Contact <a href="mailto:%s">%s</a> if you need assistance', Metasync::SUPPORT_EMAIL, Metasync::SUPPORT_EMAIL);
1526 + printf('• Contact <a href="mailto:%s">%s</a> if you need assistance', esc_attr(Metasync::SUPPORT_EMAIL), esc_html(Metasync::SUPPORT_EMAIL));
1498 1527 printf('</div>');
1499 1528 printf('</details>');
1500 1529 printf('</div>');
1501 1530
@@ -1542,14 +1571,17 @@
1542 1571 printf('</p>');
1543 1572
1544 1573 printf('</div>');
1545 1574
1575 + // The OTTO Pixel UUID is shown once, by the read-only Settings-API
1576 + // field in the OTTO Server-Side Rendering section; do not repeat it here.
1577 +
1546 1578 if( isset(Metasync::get_option('general')['searchatlas_api_key'])&&Metasync::get_option('general')['searchatlas_api_key']!=''){
1547 1579 $timestamp = @Metasync::get_option('general')['send_auth_token_timestamp'];
1548 1580 printf(
1549 1581 '<p id="sendAuthTokenTimestamp" class="descriptionValue">%s (%s)</p>',
1550 1582 esc_attr($timestamp),
1551 - $this->time_elapsed_string($timestamp)
1583 + esc_html($this->time_elapsed_string($timestamp))
1552 1584 );
1553 1585
1554 1586
1555 1587 }
@@ -1557,9 +1589,9 @@
1557 1589
1558 1590 public function bing_site_verification_callback()
1559 1591 {
1560 1592 printf(
1561 - '<input type="text" id="bing_site_verification" name="' . Metasync_Admin::option_key . '[searchengines][bing_site_verification]" value="%s" size="50" />',
1593 + '<input type="text" id="bing_site_verification" name="' . esc_attr(Metasync_Admin::option_key) . '[searchengines][bing_site_verification]" value="%s" size="50" />',
1562 1594 isset(Metasync::get_option('searchengines')['bing_site_verification']) ? esc_attr(Metasync::get_option('searchengines')['bing_site_verification']) : ''
1563 1595 );
1564 1596
1565 1597 printf(' <br> <span class="description"> Enter Bing Webmaster Tools verification code: </span> ');
@@ -1568,9 +1600,9 @@
1568 1600
1569 1601 public function yandex_site_verification_callback()
1570 1602 {
1571 1603 printf(
1572 - '<input type="text" id="yandex_site_verification" name="' . Metasync_Admin::option_key . '[searchengines][yandex_site_verification]" value="%s" size="50" />',
1604 + '<input type="text" id="yandex_site_verification" name="' . esc_attr(Metasync_Admin::option_key) . '[searchengines][yandex_site_verification]" value="%s" size="50" />',
1573 1605 isset(Metasync::get_option('searchengines')['yandex_site_verification']) ? esc_attr(Metasync::get_option('searchengines')['yandex_site_verification']) : ''
1574 1606 );
1575 1607
1576 1608 printf(' <br> <span class="description"> Enter Yandex verification code: </span>');
@@ -1579,9 +1611,9 @@
1579 1611
1580 1612 public function google_site_verification_callback()
1581 1613 {
1582 1614 printf(
1583 - '<input type="text" id="google_site_verification" name="' . Metasync_Admin::option_key . '[searchengines][google_site_verification]" value="%s" size="50" />',
1615 + '<input type="text" id="google_site_verification" name="' . esc_attr(Metasync_Admin::option_key) . '[searchengines][google_site_verification]" value="%s" size="50" />',
1584 1616 isset(Metasync::get_option('searchengines')['google_site_verification']) ? esc_attr(Metasync::get_option('searchengines')['google_site_verification']) : ''
1585 1617 );
1586 1618
1587 1619 printf(' <br> <span class="description"> Enter Google Search Console verification code: </span>');
@@ -1590,9 +1622,9 @@
1590 1622
1591 1623 public function pinterest_site_verification_callback()
1592 1624 {
1593 1625 printf(
1594 - '<input type="text" id="pinterest_site_verification" name="' . Metasync_Admin::option_key . '[searchengines][pinterest_site_verification]" value="%s" size="50" />',
1626 + '<input type="text" id="pinterest_site_verification" name="' . esc_attr(Metasync_Admin::option_key) . '[searchengines][pinterest_site_verification]" value="%s" size="50" />',
1595 1627 isset(Metasync::get_option('searchengines')['pinterest_site_verification']) ? esc_attr(Metasync::get_option('searchengines')['pinterest_site_verification']) : ''
1596 1628 );
1597 1629
1598 1630 printf(' <br> <span class="description"> Enter Pinterest verification code: </span>');
@@ -1621,10 +1653,10 @@
1621 1653
1622 1654 public function local_seo_name_callback()
1623 1655 {
1624 1656 printf(
1625 - '<input type="text" id="local_seo_name" name="' . Metasync_Admin::option_key . '[localseo][local_seo_name]" value="%s" size="50" />',
1626 - isset(Metasync::get_option('localseo')['local_seo_name']) ? esc_attr(Metasync::get_option('localseo')['local_seo_name']) : get_bloginfo()
1657 + '<input type="text" id="local_seo_name" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_name]" value="%s" size="50" />',
1658 + isset(Metasync::get_option('localseo')['local_seo_name']) ? esc_attr(Metasync::get_option('localseo')['local_seo_name']) : esc_attr(get_bloginfo())
1627 1659 );
1628 1660
1629 1661 printf(' <br> <span class="description"> Your name or company name </span>');
1630 1662 }
@@ -1640,9 +1672,9 @@
1640 1672 // would otherwise survive every subsequent Save Settings.
1641 1673 $local_seo_logo = metasync_repair_scheme_prefixed_media_id($local_seo_logo);
1642 1674
1643 1675 printf(
1644 - '<input type="hidden" id="local_seo_logo" name="' . Metasync_Admin::option_key . '[localseo][local_seo_logo]" value="%s" size="50" />',
1676 + '<input type="hidden" id="local_seo_logo" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_logo]" value="%s" size="50" />',
1645 1677 esc_attr((string) $local_seo_logo)
1646 1678 );
1647 1679
1648 1680 printf(' <br> <input class="button-secondary no-loading" type="button" id="logo_upload_button" value="Add or Upload File">');
@@ -1664,9 +1696,9 @@
1664 1696 $logo_url ? '' : ' style="display:none"'
1665 1697 );
1666 1698
1667 1699 $button_type = $logo_url ? 'button' : 'hidden';
1668 - printf('<input type="%s" class="button-secondary no-loading metasync-logo-remove-btn" id="local_seo_logo_close_btn" value="X">', $button_type);
1700 + printf('<input type="%s" class="button-secondary no-loading metasync-logo-remove-btn" id="local_seo_logo_close_btn" value="X">', esc_attr($button_type));
1669 1701 printf('</span>');
1670 1702 }
1671 1703
1672 1704 /**
@@ -1704,10 +1736,10 @@
1704 1736
1705 1737 public function local_seo_url_callback()
1706 1738 {
1707 1739 printf(
1708 - '<input type="text" id="local_seo_url" name="' . Metasync_Admin::option_key . '[localseo][local_seo_url]" value="%s" size="50" />',
1709 - isset(Metasync::get_option('localseo')['local_seo_url']) ? esc_attr(Metasync::get_option('localseo')['local_seo_url']) : home_url()
1740 + '<input type="text" id="local_seo_url" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_url]" value="%s" size="50" />',
1741 + isset(Metasync::get_option('localseo')['local_seo_url']) ? esc_attr(Metasync::get_option('localseo')['local_seo_url']) : esc_attr(home_url())
1710 1742 );
1711 1743
1712 1744 printf(' <br> <span class="description"> URL of the item. </span>');
1713 1745 }
@@ -1714,9 +1746,9 @@
1714 1746
1715 1747 public function local_seo_email_callback()
1716 1748 {
1717 1749 printf(
1718 - '<input type="text" id="local_seo_email" name="' . Metasync_Admin::option_key . '[localseo][local_seo_email]" value="%s" size="50" />',
1750 + '<input type="text" id="local_seo_email" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_email]" value="%s" size="50" />',
1719 1751 isset(Metasync::get_option('localseo')['local_seo_email']) ? esc_attr(Metasync::get_option('localseo')['local_seo_email']) : ''
1720 1752 );
1721 1753
1722 1754 printf(' <br> <span class="description"> Search engines display your email address. </span>');
@@ -1724,9 +1756,9 @@
1724 1756
1725 1757 public function local_seo_phone_callback()
1726 1758 {
1727 1759 printf(
1728 - '<input type="text" id="local_seo_phone" name="' . Metasync_Admin::option_key . '[localseo][local_seo_phone]" value="%s" size="50" />',
1760 + '<input type="text" id="local_seo_phone" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_phone]" value="%s" size="50" />',
1729 1761 isset(Metasync::get_option('localseo')['local_seo_phone']) ? esc_attr(Metasync::get_option('localseo')['local_seo_phone']) : ''
1730 1762 );
1731 1763
1732 1764 printf(' <br> <span class="description"> Search engines may prominently display your contact phone number for mobile users. </span>');
@@ -1734,29 +1766,29 @@
1734 1766
1735 1767 public function local_seo_address_callback()
1736 1768 {
1737 1769 printf(
1738 - '<input type="text" id="local_seo_address_street" name="' . Metasync_Admin::option_key . '[localseo][address][street]" value="%s" size="50" placeholder="Street Address"/> <br>',
1770 + '<input type="text" id="local_seo_address_street" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][address][street]" value="%s" size="50" placeholder="Street Address"/> <br>',
1739 1771 isset(Metasync::get_option('localseo')['address']['street']) ? esc_attr(Metasync::get_option('localseo')['address']['street']) : ''
1740 1772 );
1741 1773
1742 1774 printf(
1743 - '<input type="text" id="local_seo_address_locality" name="' . Metasync_Admin::option_key . '[localseo][address][locality]" value="%s" size="50" placeholder="Locality"/> <br>',
1775 + '<input type="text" id="local_seo_address_locality" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][address][locality]" value="%s" size="50" placeholder="Locality"/> <br>',
1744 1776 isset(Metasync::get_option('localseo')['address']['locality']) ? esc_attr(Metasync::get_option('localseo')['address']['locality']) : ''
1745 1777 );
1746 1778
1747 1779 printf(
1748 - '<input type="text" id="local_seo_address_region" name="' . Metasync_Admin::option_key . '[localseo][address][region]" value="%s" size="50" placeholder="Region"/> <br>',
1780 + '<input type="text" id="local_seo_address_region" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][address][region]" value="%s" size="50" placeholder="Region"/> <br>',
1749 1781 isset(Metasync::get_option('localseo')['address']['region']) ? esc_attr(Metasync::get_option('localseo')['address']['region']) : ''
1750 1782 );
1751 1783
1752 1784 printf(
1753 - '<input type="text" id="local_seo_address_postalcode" name="' . Metasync_Admin::option_key . '[localseo][address][postalcode]" value="%s" size="50" placeholder="Postal Code"/> <br>',
1785 + '<input type="text" id="local_seo_address_postalcode" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][address][postalcode]" value="%s" size="50" placeholder="Postal Code"/> <br>',
1754 1786 isset(Metasync::get_option('localseo')['address']['postalcode']) ? esc_attr(Metasync::get_option('localseo')['address']['postalcode']) : ''
1755 1787 );
1756 1788
1757 1789 printf(
1758 - '<input type="text" id="local_seo_address_country" name="' . Metasync_Admin::option_key . '[localseo][address][country]" value="%s" size="50" placeholder="Country"/> <br>',
1790 + '<input type="text" id="local_seo_address_country" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][address][country]" value="%s" size="50" placeholder="Country"/> <br>',
1759 1791 isset(Metasync::get_option('localseo')['address']['country']) ? esc_attr(Metasync::get_option('localseo')['address']['country']) : ''
1760 1792 );
1761 1793 }
1762 1794
@@ -1771,9 +1803,9 @@
1771 1803 <select name="<?php echo esc_attr(Metasync_Admin::option_key . '[localseo][local_seo_business_type]') ?>">
1772 1804 <option value='0'>Select Business Type</option>
1773 1805 <?php
1774 1806 foreach ($types as $type) {
1775 - printf('<option value="%s" %s >%s</option>', $type, selected($type, esc_attr($business_type)), $type);
1807 + printf('<option value="%s" %s >%s</option>', esc_attr($type), selected($type, $business_type, false), esc_html($type));
1776 1808 }
1777 1809 ?>
1778 1810 </select>
1779 1811 <?php
@@ -1797,9 +1829,9 @@
1797 1829 <li>
1798 1830 <select name="<?php echo esc_attr(Metasync_Admin::option_key . '[localseo][days][]') ?>">
1799 1831 <?php
1800 1832 foreach ($days_name as $name) {
1801 - printf('<option value="%s" %s >%s</option>', $name, selected(esc_attr($name), esc_attr($day_name)), esc_attr($name));
1833 + printf('<option value="%s" %s >%s</option>', esc_attr($name), selected($name, $day_name, false), esc_html($name));
1802 1834 }
1803 1835 ?>
1804 1836 </select>
1805 1837 <input type="text" name="<?php echo esc_attr(Metasync_Admin::option_key . '[localseo][times][]') ?>" value="<?php echo esc_attr($day_time) ?>">
@@ -1878,9 +1910,9 @@
1878 1910
1879 1911 public function local_seo_price_range_callback()
1880 1912 {
1881 1913 printf(
1882 - '<input type="text" id="local_seo_price_range" name="' . Metasync_Admin::option_key . '[localseo][local_seo_price_range]" value="%s" size="50" />',
1914 + '<input type="text" id="local_seo_price_range" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_price_range]" value="%s" size="50" />',
1883 1915 isset(Metasync::get_option('localseo')['local_seo_price_range']) ? esc_attr(Metasync::get_option('localseo')['local_seo_price_range']) : ''
1884 1916 );
1885 1917 printf(' <br> <span class="description"> The price range of the business, for example $$$. </span>');
1886 1918 }
@@ -1893,9 +1925,9 @@
1893 1925 <?php
1894 1926 $about_page = Metasync::get_option('localseo')['local_seo_about_page'] ?? '';
1895 1927 $pages = get_pages();
1896 1928 foreach ($pages as $page) {
1897 - printf('<option value="%s" %s >%s</option>', $page->ID, selected($page->ID, esc_attr($about_page)), $page->post_title);
1929 + printf('<option value="%s" %s >%s</option>', absint($page->ID), selected($page->ID, $about_page, false), esc_html($page->post_title));
1898 1930 }
1899 1931 ?>
1900 1932 </select>
1901 1933 <?php
@@ -1910,9 +1942,9 @@
1910 1942 <?php
1911 1943 $contact_page = Metasync::get_option('localseo')['local_seo_contact_page'] ?? '';
1912 1944 $pages = get_pages();
1913 1945 foreach ($pages as $page) {
1914 - printf('<option value="%s" %s >%s</option>', $page->ID, selected($page->ID, esc_attr($contact_page)), $page->post_title);
1946 + printf('<option value="%s" %s >%s</option>', absint($page->ID), selected($page->ID, $contact_page, false), esc_html($page->post_title));
1915 1947 }
1916 1948 ?>
1917 1949 </select>
1918 1950 <?php
@@ -1921,9 +1953,9 @@
1921 1953
1922 1954 public function local_seo_map_key_callback()
1923 1955 {
1924 1956 printf(
1925 - '<input type="text" id="local_seo_map_key" name="' . Metasync_Admin::option_key . '[localseo][local_seo_map_key]" value="%s" size="50" />',
1957 + '<input type="text" id="local_seo_map_key" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_map_key]" value="%s" size="50" />',
1926 1958 isset(Metasync::get_option('localseo')['local_seo_map_key']) ? esc_attr(Metasync::get_option('localseo')['local_seo_map_key']) : ''
1927 1959 );
1928 1960
1929 1961 printf(' <br> <span class="description"> An API Key is required to display embedded Google Maps on your site. </span>');
@@ -1931,9 +1963,9 @@
1931 1963
1932 1964 public function local_seo_geo_coordinates_callback()
1933 1965 {
1934 1966 printf(
1935 - '<input type="text" id="local_seo_geo_coordinates" name="' . Metasync_Admin::option_key . '[localseo][local_seo_geo_coordinates]" value="%s" size="50" />',
1967 + '<input type="text" id="local_seo_geo_coordinates" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_geo_coordinates]" value="%s" size="50" />',
1936 1968 isset(Metasync::get_option('localseo')['local_seo_geo_coordinates']) ? esc_attr(Metasync::get_option('localseo')['local_seo_geo_coordinates']) : ''
1937 1969 );
1938 1970
1939 1971 printf(' <br> <span class="description"> Latitude and longitude values separated by comma. </span>');
@@ -1941,9 +1973,9 @@
1941 1973
1942 1974 public function header_snippets_callback()
1943 1975 {
1944 1976 printf(
1945 - '<textarea class="wide-text" id="header_snippets" rows="8" name="' . Metasync_Admin::option_key . '[codesnippets][header_snippet]" >%s</textarea>',
1977 + '<textarea class="wide-text" id="header_snippets" rows="8" name="' . esc_attr(Metasync_Admin::option_key) . '[codesnippets][header_snippet]" >%s</textarea>',
1946 1978 isset(Metasync::get_option('codesnippets')['header_snippet']) ? esc_attr(Metasync::get_option('codesnippets')['header_snippet']) : ''
1947 1979 );
1948 1980 }
1949 1981
@@ -1949,9 +1981,9 @@
1949 1981
1950 1982 public function footer_snippets_callback()
1951 1983 {
1952 1984 printf(
1953 - '<textarea class="wide-text" id="footer_snippets" rows="8" name="' . Metasync_Admin::option_key . '[codesnippets][footer_snippet]" >%s</textarea>',
1985 + '<textarea class="wide-text" id="footer_snippets" rows="8" name="' . esc_attr(Metasync_Admin::option_key) . '[codesnippets][footer_snippet]" >%s</textarea>',
1954 1986 isset(Metasync::get_option('codesnippets')['footer_snippet']) ? esc_attr(Metasync::get_option('codesnippets')['footer_snippet']) : ''
1955 1987 );
1956 1988 }
1957 1989
@@ -2088,9 +2120,9 @@
2088 2120
2089 2121 public function global_open_graph_meta_callback()
2090 2122 {
2091 2123 printf(
2092 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][open_graph_meta_tags]" value="true" %s />',
2124 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][open_graph_meta_tags]" value="true" %s />',
2093 2125 isset(Metasync::get_option('common_meta_settings')['open_graph_meta_tags']) && Metasync::get_option('common_meta_settings')['open_graph_meta_tags'] == 'true' ? 'checked' : ''
2094 2126 );
2095 2127 printf(' <br> <span class="description"> Automatically add the Open Graph meta tags in a page or post.</span>');
2096 2128 }
@@ -2097,9 +2129,9 @@
2097 2129
2098 2130 public function global_facebook_meta_callback()
2099 2131 {
2100 2132 printf(
2101 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][facebook_meta_tags]" value="true" %s />',
2133 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][facebook_meta_tags]" value="true" %s />',
2102 2134 isset(Metasync::get_option('common_meta_settings')['facebook_meta_tags']) && Metasync::get_option('common_meta_settings')['facebook_meta_tags'] == 'true' ? 'checked' : ''
2103 2135 );
2104 2136 printf(' <br> <span class="description"> Automatically add the Facebook meta tags in a page or post.</span>');
2105 2137 }
@@ -2106,9 +2138,9 @@
2106 2138
2107 2139 public function global_twitter_meta_callback()
2108 2140 {
2109 2141 printf(
2110 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][twitter_meta_tags]" value="true" %s />',
2142 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][twitter_meta_tags]" value="true" %s />',
2111 2143 isset(Metasync::get_option('common_meta_settings')['twitter_meta_tags']) && Metasync::get_option('common_meta_settings')['twitter_meta_tags'] == 'true' ? 'checked' : ''
2112 2144 );
2113 2145 printf(' <br> <span class="description"> Automatically add the Twitter meta tags in a page or post.</span>');
2114 2146 }
@@ -2116,9 +2148,9 @@
2116 2148 public function og_image_dimensions_callback()
2117 2149 {
2118 2150 $val = Metasync::get_option('common_meta_settings')['og_image_dimensions'] ?? 'true';
2119 2151 printf(
2120 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][og_image_dimensions]" value="true" %s />',
2152 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][og_image_dimensions]" value="true" %s />',
2121 2153 $val === 'true' ? 'checked' : ''
2122 2154 );
2123 2155 printf('<span class="description"> Output og:image:width, og:image:height, and og:image:type when OG image metadata is available.</span>');
2124 2156 }
@@ -2126,9 +2158,9 @@
2126 2158 public function article_timestamps_callback()
2127 2159 {
2128 2160 $val = Metasync::get_option('common_meta_settings')['article_timestamps'] ?? 'true';
2129 2161 printf(
2130 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][article_timestamps]" value="true" %s />',
2162 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][article_timestamps]" value="true" %s />',
2131 2163 $val === 'true' ? 'checked' : ''
2132 2164 );
2133 2165 printf('<span class="description"> Output article:published_time and article:modified_time from the post publish and modified dates (ISO 8601).</span>');
2134 2166 }
@@ -2136,9 +2168,9 @@
2136 2168 public function article_author_callback()
2137 2169 {
2138 2170 $val = Metasync::get_option('common_meta_settings')['article_author'] ?? 'true';
2139 2171 printf(
2140 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][article_author]" value="true" %s />',
2172 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][article_author]" value="true" %s />',
2141 2173 $val === 'true' ? 'checked' : ''
2142 2174 );
2143 2175 printf('<span class="description"> Output article:author using the post author website URL or archive URL (overridable per-post via _metasync_og_article_author meta).</span>');
2144 2176 }
@@ -2146,9 +2178,9 @@
2146 2178 public function article_section_callback()
2147 2179 {
2148 2180 $val = Metasync::get_option('common_meta_settings')['article_section'] ?? 'true';
2149 2181 printf(
2150 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][article_section]" value="true" %s />',
2182 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][article_section]" value="true" %s />',
2151 2183 $val === 'true' ? 'checked' : ''
2152 2184 );
2153 2185 printf('<span class="description"> Output article:section from the primary category (falls back to first category).</span>');
2154 2186 }
@@ -2156,9 +2188,9 @@
2156 2188 public function article_tags_callback()
2157 2189 {
2158 2190 $val = Metasync::get_option('common_meta_settings')['article_tags'] ?? 'true';
2159 2191 printf(
2160 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][article_tags]" value="true" %s />',
2192 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][article_tags]" value="true" %s />',
2161 2193 $val === 'true' ? 'checked' : ''
2162 2194 );
2163 2195 printf('<span class="description"> Output one article:tag meta tag per WordPress post tag.</span>');
2164 2196 }
@@ -2166,9 +2198,9 @@
2166 2198 public function twitter_image_alt_callback()
2167 2199 {
2168 2200 $val = Metasync::get_option('common_meta_settings')['twitter_image_alt'] ?? 'true';
2169 2201 printf(
2170 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][twitter_image_alt]" value="true" %s />',
2202 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][twitter_image_alt]" value="true" %s />',
2171 2203 $val === 'true' ? 'checked' : ''
2172 2204 );
2173 2205 printf('<span class="description"> Output twitter:image:alt using the stored alt text or the OG image attachment alt attribute.</span>');
2174 2206 }
@@ -2175,9 +2207,9 @@
2175 2207
2176 2208 public function facebook_page_url_callback()
2177 2209 {
2178 2210 $facebook_page_url = Metasync::get_option('social_meta')['facebook_page_url'] ?? '';
2179 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_page_url]" value="%s" size="50" />', esc_attr($facebook_page_url));
2211 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][facebook_page_url]" value="%s" size="50" />', esc_attr($facebook_page_url));
2180 2212 printf('<br><span class="description"> Enter your Facebook page URL. eg: <code>https://www.facebook.com/MetaSync/</code> </span>');
2181 2213 }
2182 2214
2183 2215 public function facebook_authorship_callback()
@@ -2182,9 +2214,9 @@
2182 2214
2183 2215 public function facebook_authorship_callback()
2184 2216 {
2185 2217 $facebook_authorship = Metasync::get_option('social_meta')['facebook_authorship'] ?? '';
2186 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_authorship]" value="%s" size="50" />', esc_attr($facebook_authorship));
2218 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][facebook_authorship]" value="%s" size="50" />', esc_attr($facebook_authorship));
2187 2219 printf('<br><span class="description"> Enter Facebook profile URL to show Facebook Authorship when your articles are being shared on Facebook. eg: <code>https://www.facebook.com/shahrukh/</code> </span>');
2188 2220 }
2189 2221
2190 2222 public function facebook_admin_callback()
@@ -2189,9 +2221,9 @@
2189 2221
2190 2222 public function facebook_admin_callback()
2191 2223 {
2192 2224 $facebook_admin = Metasync::get_option('social_meta')['facebook_admin'] ?? '';
2193 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_admin]" value="%s" size="50" />', esc_attr($facebook_admin));
2225 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][facebook_admin]" value="%s" size="50" />', esc_attr($facebook_admin));
2194 2226 printf(' <br> <span class="description"> Enter numeric user ID of Facebook. </span>');
2195 2227 }
2196 2228
2197 2229 public function facebook_app_callback()
@@ -2196,9 +2228,9 @@
2196 2228
2197 2229 public function facebook_app_callback()
2198 2230 {
2199 2231 $facebook_app = Metasync::get_option('social_meta')['facebook_app'] ?? '';
2200 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_app]" value="%s" size="50" />', esc_attr($facebook_app));
2232 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][facebook_app]" value="%s" size="50" />', esc_attr($facebook_app));
2201 2233 printf(' <br> <span class="description"> Enter numeric app ID of Facebook </span>');
2202 2234 }
2203 2235
2204 2236 public function facebook_secret_callback()
@@ -2203,9 +2235,9 @@
2203 2235
2204 2236 public function facebook_secret_callback()
2205 2237 {
2206 2238 $facebook_secret = Metasync::get_option('social_meta')['facebook_secret'] ?? '';
2207 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_secret]" value="%s" size="50" />', esc_attr($facebook_secret));
2239 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][facebook_secret]" value="%s" size="50" />', esc_attr($facebook_secret));
2208 2240 printf(' <br> <span class="description"> Enter alphanumeric access token from Facebook. </span>');
2209 2241 }
2210 2242
2211 2243 public function twitter_username_callback()
@@ -2210,9 +2242,9 @@
2210 2242
2211 2243 public function twitter_username_callback()
2212 2244 {
2213 2245 $twitter_username = Metasync::get_option('social_meta')['twitter_username'] ?? '';
2214 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][twitter_username]" value="%s" size="50" />', esc_attr($twitter_username));
2246 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][twitter_username]" value="%s" size="50" />', esc_attr($twitter_username));
2215 2247 printf(' <br> <span class="description"> Twitter username of the author to add <code>twitter:creator</code> tag to post. eg: <code>MetaSync</code> </span>');
2216 2248 }
2217 2249
2218 2250 public static function get_business_types()