PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.7.1
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.7.1
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 +101 -62 2.6.26 → 2.7.1 View file →
@@ -46,9 +46,15 @@
46 46 // Accordion / Section helpers
47 47 // ────────────────────────────────────────────────────────────────
48 48
49 49 public function get_accordion_sections_config() {
50 - return array(
50 + // Consent switch for writing into other SEO plugins. Loaded here rather
51 + // than through the committed classmap so a stale autoload map can never
52 + // make the switch — and with it the user's only way to stop those
53 + // writes — silently disappear from the page.
54 + require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-metasync-seo-sync-settings.php';
55 +
56 + $sections = array(
51 57 'connection' => array(
52 58 'title' => 'Connection & Authentication',
53 59 'description' => 'Manage your API connection and authentication settings',
54 60 'icon' => 'admin-network',
@@ -68,8 +74,9 @@
68 74 'fields' => array(
69 75 'otto_pixel_uuid',
70 76 'otto_disable_on_loggedin',
71 77 'otto_disable_preview_button',
78 + 'seo_priority',
72 79 'otto_wp_rocket_compat',
73 80 'otto_sg_optimizer_compat',
74 81 'bookingpress_session_compat',
75 82 )
@@ -81,8 +88,16 @@
81 88 'priority' => 22,
82 89 'default_open' => false,
83 90 'render_callback' => array('Metasync_Edge_Cache_Settings', 'render'),
84 91 ),
92 + 'seo_plugin_sync' => array(
93 + 'title' => 'Sync to Other SEO Plugins',
94 + 'description' => 'Control whether ' . Metasync::get_whitelabel_otto_name() . '\'s SEO values are written into Yoast, Rank Math or All in One SEO',
95 + 'icon' => 'update',
96 + 'priority' => 23,
97 + 'default_open' => false,
98 + 'render_callback' => array('Metasync_Seo_Sync_Settings', 'render'),
99 + ),
85 100 'bot_detection' => array(
86 101 'title' => 'Bot Detection & Filtering',
87 102 'description' => 'Manage bot traffic and reduce unnecessary API calls',
88 103 'icon' => 'filter',
@@ -122,8 +137,9 @@
122 137 'disable_redirection_metabox',
123 138 'disable_canonical_metabox',
124 139 'disable_social_opengraph_metabox',
125 140 'disable_schema_markup_metabox',
141 + 'disable_language_alternates_metabox',
126 142 'disable_seo_metabox',
127 143 'open_external_links'
128 144 )
129 145 ),
@@ -164,13 +180,22 @@
164 180 'fields' => array(
165 181 'permalink_structure',
166 182 'hide_dashboard_framework',
167 183 'show_admin_bar_status',
168 - 'enable_auto_updates',
169 184 'import_external_data'
170 185 )
171 186 )
172 187 );
188 +
189 + // Hidden only when there is nothing to say: no SEO plugin installed, the
190 + // switch off, and no saved originals. It is never hidden by the
191 + // access-control or whitelabel flags that can conceal Advanced Settings
192 + // — a switch that rewrites another plugin's data must stay reachable.
193 + if (!Metasync_Seo_Sync_Settings::should_display()) {
194 + unset($sections['seo_plugin_sync']);
195 + }
196 +
197 + return $sections;
173 198 }
174 199
175 200 public function get_advanced_accordion_config() {
176 201 $config = array();
@@ -195,8 +220,17 @@
195 220 'default_open' => false,
196 221 'render_callback' => array($this->admin_instance, 'render_debug_mode_section')
197 222 );
198 223
224 + $config['headless_mode'] = array(
225 + 'title' => 'Headless Mode',
226 + 'description' => 'Connect WordPress content to a separate public frontend',
227 + 'icon' => 'admin-site-alt3',
228 + 'priority' => 29,
229 + 'default_open' => false,
230 + 'render_callback' => array(Metasync_Settings_Registration::instance(), 'render_headless_mode_section')
231 + );
232 +
199 233 $config['error_logs'] = array(
200 234 'title' => 'Error Logs',
201 235 'description' => 'View and manage error logs to troubleshoot issues',
202 236 'icon' => 'warning',
@@ -269,9 +303,9 @@
269 303 $content_state = $is_open ? 'open' : 'closed';
270 304
271 305 echo '<div class="metasync-accordion-section" data-section="' . esc_attr($section_key) . '">';
272 306
273 - echo '<div class="metasync-accordion-header" role="button" tabindex="0" aria-expanded="' . $aria_expanded . '" aria-controls="' . $section_id . '">';
307 + echo '<div class="metasync-accordion-header" role="button" tabindex="0" aria-expanded="' . esc_attr($aria_expanded) . '" aria-controls="' . esc_attr($section_id) . '">';
274 308 echo '<div class="metasync-accordion-title">';
275 309 echo '<span class="metasync-accordion-icon"><span class="dashicons dashicons-' . esc_attr($section_data['icon']) . '"></span></span>';
276 310 echo '<div class="metasync-accordion-text">';
277 311 echo '<h3>' . esc_html($section_data['title']) . '</h3>';
@@ -282,9 +316,9 @@
282 316 echo '<span class="toggle-icon">▼</span>';
283 317 echo '</button>';
284 318 echo '</div>';
285 319
286 - echo '<div class="metasync-accordion-content" id="' . $section_id . '" data-state="' . $content_state . '">';
320 + echo '<div class="metasync-accordion-content" id="' . esc_attr($section_id) . '" data-state="' . esc_attr($content_state) . '">';
287 321
288 322 if (isset($section_data['render_callback']) && is_callable($section_data['render_callback'])) {
289 323 call_user_func($section_data['render_callback']);
290 324 }
@@ -378,14 +412,18 @@
378 412 if (!function_exists('google_index_direct')) {
379 413 if (file_exists(plugin_dir_path(dirname(__FILE__)) . 'google-index/google-index-init.php')) {
380 414 require_once plugin_dir_path(dirname(__FILE__)) . 'google-index/google-index-init.php';
381 415 } else {
382 - error_log('MetaSync Google Index: google-index-init.php not found at ' . plugin_dir_path(dirname(__FILE__)) . 'google-index/google-index-init.php');
416 + 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
383 417 return;
384 418 }
385 419 }
386 420
387 421 $google_index = google_index_direct();
422 + if (!$google_index) {
423 + // Nothing to render against, and calling through would be fatal.
424 + return;
425 + }
388 426 $service_info = $google_index->get_service_account_info();
389 427 $is_configured = !isset($service_info['error']);
390 428
391 429 $saved_json_display = $is_configured ? $google_index->get_redacted_config_json() : '';
@@ -664,9 +702,9 @@
664 702 <p style="color: var(--dashboard-text-secondary); margin: 0 0 20px 0;">
665 703 Select which user roles can see and access this plugin's menu, settings, and options in the WordPress admin area.
666 704 </p>
667 705
668 - <form method="post" action="<?php echo admin_url('admin.php?page=' . Metasync_Admin::$page_slug . '&tab=advanced'); ?>" id="plugin-access-roles-form">
706 + <form method="post" action="<?php echo esc_url(admin_url('admin.php?page=' . Metasync_Admin::$page_slug . '&tab=advanced')); ?>" id="plugin-access-roles-form">
669 707 <?php wp_nonce_field('metasync_plugin_access_roles_nonce', 'plugin_access_roles_nonce'); ?>
670 708 <input type="hidden" name="save_plugin_access_roles" value="yes" />
671 709
672 710 <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;">
@@ -784,9 +822,9 @@
784 822
785 823 public function can_change_memory_limit() {
786 824 $current_limit = ini_get('memory_limit');
787 825
788 - $test_result = @ini_set('memory_limit', $current_limit);
826 + $test_result = @ini_set('memory_limit', $current_limit); // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Discouraged -- runtime PHP setting with no WordPress API
789 827
790 828 return $test_result !== false;
791 829 }
792 830
@@ -838,9 +876,9 @@
838 876 }
839 877
840 878 $memory_limit_mb = $this->get_execution_setting('max_memory_limit');
841 879
842 - $result = @ini_set('memory_limit', $memory_limit_mb . 'M');
880 + $result = @ini_set('memory_limit', $memory_limit_mb . 'M'); // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Discouraged -- runtime PHP setting with no WordPress API
843 881
844 882 return $result !== false;
845 883 }
846 884
@@ -1092,8 +1130,9 @@
1092 1130 '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),
1093 1131 '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),
1094 1132 '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),
1095 1133 '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),
1134 + '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),
1096 1135 '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),
1097 1136 '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),
1098 1137 '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.',
1099 1138 '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),
@@ -1105,8 +1144,9 @@
1105 1144 'disable_redirection_metabox' => 'Hide the Redirection meta box and stop redirects configured through it from running. Rules added by hand on the Redirections screen keep working. Saved redirects are kept and resume if you re-enable this.',
1106 1145 'disable_canonical_metabox' => sprintf('Hide the Canonical meta box and stop %1$s emitting or overriding the canonical URL on every render path. WordPress core and third-party canonicals are left in place. Saved values are kept and restored if you re-enable this.', Metasync::get_effective_plugin_name('MetaSync')),
1107 1146 'disable_social_opengraph_metabox' => sprintf('Hide the Social Media & Open Graph meta box and stop %1$s emitting any Open Graph, Twitter or article tags. Tags from another SEO plugin are left in place. Saved values are kept and restored if you re-enable this.', Metasync::get_effective_plugin_name('MetaSync')),
1108 1147 'disable_schema_markup_metabox' => sprintf('Hide the Schema Markup meta box and stop %1$s emitting any JSON-LD, including the site-wide Local SEO markup and OTTO structured data. Breadcrumb markup has its own setting. Saved values are kept and restored if you re-enable this.', Metasync::get_effective_plugin_name('MetaSync')),
1148 + 'disable_language_alternates_metabox' => sprintf('Hide the Language Alternates (hreflang) panel in the block editor and stop %1$s emitting any hreflang tags on the front end, including the auto-detected WPML entries. While disabled, %1$s does not manage or override this data — another SEO plugin, or WPML itself, is free to handle it. Saved values are kept and restored if you re-enable this.', Metasync::get_effective_plugin_name('MetaSync')),
1109 1149 'disable_seo_metabox' => 'Hide the SEO Title & Meta Description meta box from post and page edit screens. This removes the Classic editor SEO fields (the Gutenberg sidebar is unaffected).',
1110 1150 'open_external_links' => sprintf('Automatically add target="_blank" attribute to external links appearing in your posts, pages, and other post types when rendered by %s.', $otto_name),
1111 1151 '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.',
1112 1152 '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),
@@ -1111,9 +1151,8 @@
1111 1151 '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.',
1112 1152 '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),
1113 1153 '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),
1114 1154 '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),
1115 - '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),
1116 1155 '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),
1117 1156 '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),
1118 1157 '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.',
1119 1158 '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.',
@@ -1159,9 +1198,9 @@
1159 1198 $content_state = $is_open ? 'open' : 'closed';
1160 1199
1161 1200 echo '<div class="metasync-accordion-section" data-section="' . esc_attr($section_key) . '">';
1162 1201
1163 - echo '<div class="metasync-accordion-header" role="button" tabindex="0" aria-expanded="' . $aria_expanded . '" aria-controls="' . $section_id . '">';
1202 + echo '<div class="metasync-accordion-header" role="button" tabindex="0" aria-expanded="' . esc_attr($aria_expanded) . '" aria-controls="' . esc_attr($section_id) . '">';
1164 1203 echo '<div class="metasync-accordion-title">';
1165 1204 echo '<span class="metasync-accordion-icon"><span class="dashicons dashicons-' . esc_attr($section_data['icon']) . '"></span></span>';
1166 1205 echo '<div class="metasync-accordion-text">';
1167 1206 echo '<h3>' . esc_html($section_data['title']) . '</h3>';
@@ -1172,9 +1211,9 @@
1172 1211 echo '<span class="toggle-icon">▼</span>';
1173 1212 echo '</button>';
1174 1213 echo '</div>';
1175 1214
1176 - echo '<div class="metasync-accordion-content" id="' . $section_id . '" data-state="' . $content_state . '">';
1215 + echo '<div class="metasync-accordion-content" id="' . esc_attr($section_id) . '" data-state="' . esc_attr($content_state) . '">';
1177 1216
1178 1217 if (isset($section_data['render_callback']) && is_callable($section_data['render_callback'])) {
1179 1218 call_user_func($section_data['render_callback']);
1180 1219 } elseif (isset($section_data['fields']) && is_array($section_data['fields'])) {
@@ -1189,9 +1228,9 @@
1189 1228 echo '<tr>';
1190 1229 echo '<th scope="row">';
1191 1230 if (!empty($field['title'])) {
1192 1231 echo '<div class="metasync-field-label-wrapper">';
1193 - echo '<label for="' . esc_attr($field['id']) . '">' . $field['title'] . '</label>';
1232 + echo '<label for="' . esc_attr($field['id']) . '">' . esc_html($field['title']) . '</label>';
1194 1233
1195 1234 if (isset($tooltips[$field_id])) {
1196 1235 echo '<button type="button" class="metasync-tooltip-trigger" data-tooltip-id="' . esc_attr($field_id) . '" aria-label="More information">';
1197 1236 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">';
@@ -1246,9 +1285,9 @@
1246 1285 echo '<tr>';
1247 1286 echo '<th scope="row">';
1248 1287 if (!empty($field['title'])) {
1249 1288 echo '<div class="metasync-field-label-wrapper">';
1250 - echo '<label for="' . esc_attr($field['id']) . '">' . $field['title'] . '</label>';
1289 + echo '<label for="' . esc_attr($field['id']) . '">' . esc_html($field['title']) . '</label>';
1251 1290 if (isset($llms_tooltips[$field['id']])) {
1252 1291 Metasync::render_tooltip_icon($field['id'], $llms_tooltips[$field['id']]);
1253 1292 }
1254 1293 echo '</div>';
@@ -1302,32 +1341,32 @@
1302 1341 $display_value = $current_token;
1303 1342 $status_message = 'Plugin Auth Token is active and ready for authentication.';
1304 1343 $refresh_help = 'Click refresh to generate a new token and update the heartbeat API.';
1305 1344 } else {
1306 - $display_value = 'Auto-generated when connecting to ' . esc_html(Metasync::get_effective_plugin_name());
1307 - $status_message = 'Plugin Auth Token will be automatically generated when you click "Connect to ' . esc_html(Metasync::get_effective_plugin_name()) . '".';
1345 + $display_value = 'Auto-generated when connecting to ' . Metasync::get_effective_plugin_name();
1346 + $status_message = 'Plugin Auth Token will be automatically generated when you click "Connect to ' . Metasync::get_effective_plugin_name() . '".';
1308 1347 $refresh_help = 'You can also manually generate a token by clicking refresh.';
1309 1348 }
1310 1349
1311 1350 printf('<div class="metasync-auth-token-row">');
1312 1351 printf(
1313 - '<input type="text" id="apikey" name="' . Metasync_Admin::option_key . '[general][apikey]" value="%s" size="40" class="regular-text" readonly="readonly" />',
1352 + '<input type="text" id="apikey" name="' . esc_attr(Metasync_Admin::option_key) . '[general][apikey]" value="%s" size="40" class="regular-text" readonly="readonly" />',
1314 1353 esc_attr($display_value)
1315 1354 );
1316 1355 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>');
1317 1356 printf('</div>');
1318 - printf('<p class="description">%s %s</p>', $status_message, $refresh_help);
1357 + printf('<p class="description">%s %s</p>', esc_html($status_message), esc_html($refresh_help));
1319 1358 }
1320 1359
1321 1360 public function linkgraph_token_callback()
1322 1361 {
1323 1362 printf(
1324 - '<input type="text" id="linkgraph_token" name="' . Metasync_Admin::option_key . '[general][linkgraph_token]" value="%s" size="25" readonly="readonly" />',
1363 + '<input type="text" id="linkgraph_token" name="' . esc_attr(Metasync_Admin::option_key) . '[general][linkgraph_token]" value="%s" size="25" readonly="readonly" />',
1325 1364 isset(Metasync::get_option('general')['linkgraph_token']) ? esc_attr(Metasync::get_option('general')['linkgraph_token']) : ''
1326 1365 );
1327 1366
1328 1367 printf(
1329 - '<input type="text" id="linkgraph_customer_id" name="' . Metasync_Admin::option_key . '[general][linkgraph_customer_id]" value="%s" size="25" readonly="readonly" />',
1368 + '<input type="text" id="linkgraph_customer_id" name="' . esc_attr(Metasync_Admin::option_key) . '[general][linkgraph_customer_id]" value="%s" size="25" readonly="readonly" />',
1330 1369 isset(Metasync::get_option('general')['linkgraph_customer_id']) ? esc_attr(Metasync::get_option('general')['linkgraph_customer_id']) : ''
1331 1370 );
1332 1371
1333 1372 ?>
@@ -1452,9 +1491,9 @@
1452 1491 printf('• The authentication window will open in a popup - please allow popups<br/>');
1453 1492 printf('• The process typically takes 15-30 seconds to complete<br/>');
1454 1493 printf('• Your API key will be stored securely and shown masked below<br/>');
1455 1494 printf('• If you encounter issues, try disabling ad blockers temporarily<br/>');
1456 - printf('• Contact <a href="mailto:%s">%s</a> if you need assistance', Metasync::SUPPORT_EMAIL, Metasync::SUPPORT_EMAIL);
1495 + printf('• Contact <a href="mailto:%s">%s</a> if you need assistance', esc_attr(Metasync::SUPPORT_EMAIL), esc_html(Metasync::SUPPORT_EMAIL));
1457 1496 printf('</div>');
1458 1497 printf('</details>');
1459 1498 printf('</div>');
1460 1499
@@ -1506,9 +1545,9 @@
1506 1545 $timestamp = @Metasync::get_option('general')['send_auth_token_timestamp'];
1507 1546 printf(
1508 1547 '<p id="sendAuthTokenTimestamp" class="descriptionValue">%s (%s)</p>',
1509 1548 esc_attr($timestamp),
1510 - $this->time_elapsed_string($timestamp)
1549 + esc_html($this->time_elapsed_string($timestamp))
1511 1550 );
1512 1551
1513 1552
1514 1553 }
@@ -1516,9 +1555,9 @@
1516 1555
1517 1556 public function bing_site_verification_callback()
1518 1557 {
1519 1558 printf(
1520 - '<input type="text" id="bing_site_verification" name="' . Metasync_Admin::option_key . '[searchengines][bing_site_verification]" value="%s" size="50" />',
1559 + '<input type="text" id="bing_site_verification" name="' . esc_attr(Metasync_Admin::option_key) . '[searchengines][bing_site_verification]" value="%s" size="50" />',
1521 1560 isset(Metasync::get_option('searchengines')['bing_site_verification']) ? esc_attr(Metasync::get_option('searchengines')['bing_site_verification']) : ''
1522 1561 );
1523 1562
1524 1563 printf(' <br> <span class="description"> Enter Bing Webmaster Tools verification code: </span> ');
@@ -1527,9 +1566,9 @@
1527 1566
1528 1567 public function yandex_site_verification_callback()
1529 1568 {
1530 1569 printf(
1531 - '<input type="text" id="yandex_site_verification" name="' . Metasync_Admin::option_key . '[searchengines][yandex_site_verification]" value="%s" size="50" />',
1570 + '<input type="text" id="yandex_site_verification" name="' . esc_attr(Metasync_Admin::option_key) . '[searchengines][yandex_site_verification]" value="%s" size="50" />',
1532 1571 isset(Metasync::get_option('searchengines')['yandex_site_verification']) ? esc_attr(Metasync::get_option('searchengines')['yandex_site_verification']) : ''
1533 1572 );
1534 1573
1535 1574 printf(' <br> <span class="description"> Enter Yandex verification code: </span>');
@@ -1538,9 +1577,9 @@
1538 1577
1539 1578 public function google_site_verification_callback()
1540 1579 {
1541 1580 printf(
1542 - '<input type="text" id="google_site_verification" name="' . Metasync_Admin::option_key . '[searchengines][google_site_verification]" value="%s" size="50" />',
1581 + '<input type="text" id="google_site_verification" name="' . esc_attr(Metasync_Admin::option_key) . '[searchengines][google_site_verification]" value="%s" size="50" />',
1543 1582 isset(Metasync::get_option('searchengines')['google_site_verification']) ? esc_attr(Metasync::get_option('searchengines')['google_site_verification']) : ''
1544 1583 );
1545 1584
1546 1585 printf(' <br> <span class="description"> Enter Google Search Console verification code: </span>');
@@ -1549,9 +1588,9 @@
1549 1588
1550 1589 public function pinterest_site_verification_callback()
1551 1590 {
1552 1591 printf(
1553 - '<input type="text" id="pinterest_site_verification" name="' . Metasync_Admin::option_key . '[searchengines][pinterest_site_verification]" value="%s" size="50" />',
1592 + '<input type="text" id="pinterest_site_verification" name="' . esc_attr(Metasync_Admin::option_key) . '[searchengines][pinterest_site_verification]" value="%s" size="50" />',
1554 1593 isset(Metasync::get_option('searchengines')['pinterest_site_verification']) ? esc_attr(Metasync::get_option('searchengines')['pinterest_site_verification']) : ''
1555 1594 );
1556 1595
1557 1596 printf(' <br> <span class="description"> Enter Pinterest verification code: </span>');
@@ -1580,10 +1619,10 @@
1580 1619
1581 1620 public function local_seo_name_callback()
1582 1621 {
1583 1622 printf(
1584 - '<input type="text" id="local_seo_name" name="' . Metasync_Admin::option_key . '[localseo][local_seo_name]" value="%s" size="50" />',
1585 - isset(Metasync::get_option('localseo')['local_seo_name']) ? esc_attr(Metasync::get_option('localseo')['local_seo_name']) : get_bloginfo()
1623 + '<input type="text" id="local_seo_name" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_name]" value="%s" size="50" />',
1624 + isset(Metasync::get_option('localseo')['local_seo_name']) ? esc_attr(Metasync::get_option('localseo')['local_seo_name']) : esc_attr(get_bloginfo())
1586 1625 );
1587 1626
1588 1627 printf(' <br> <span class="description"> Your name or company name </span>');
1589 1628 }
@@ -1599,9 +1638,9 @@
1599 1638 // would otherwise survive every subsequent Save Settings.
1600 1639 $local_seo_logo = metasync_repair_scheme_prefixed_media_id($local_seo_logo);
1601 1640
1602 1641 printf(
1603 - '<input type="hidden" id="local_seo_logo" name="' . Metasync_Admin::option_key . '[localseo][local_seo_logo]" value="%s" size="50" />',
1642 + '<input type="hidden" id="local_seo_logo" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_logo]" value="%s" size="50" />',
1604 1643 esc_attr((string) $local_seo_logo)
1605 1644 );
1606 1645
1607 1646 printf(' <br> <input class="button-secondary no-loading" type="button" id="logo_upload_button" value="Add or Upload File">');
@@ -1623,9 +1662,9 @@
1623 1662 $logo_url ? '' : ' style="display:none"'
1624 1663 );
1625 1664
1626 1665 $button_type = $logo_url ? 'button' : 'hidden';
1627 - printf('<input type="%s" class="button-secondary no-loading metasync-logo-remove-btn" id="local_seo_logo_close_btn" value="X">', $button_type);
1666 + 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));
1628 1667 printf('</span>');
1629 1668 }
1630 1669
1631 1670 /**
@@ -1663,10 +1702,10 @@
1663 1702
1664 1703 public function local_seo_url_callback()
1665 1704 {
1666 1705 printf(
1667 - '<input type="text" id="local_seo_url" name="' . Metasync_Admin::option_key . '[localseo][local_seo_url]" value="%s" size="50" />',
1668 - isset(Metasync::get_option('localseo')['local_seo_url']) ? esc_attr(Metasync::get_option('localseo')['local_seo_url']) : home_url()
1706 + '<input type="text" id="local_seo_url" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_url]" value="%s" size="50" />',
1707 + isset(Metasync::get_option('localseo')['local_seo_url']) ? esc_attr(Metasync::get_option('localseo')['local_seo_url']) : esc_attr(home_url())
1669 1708 );
1670 1709
1671 1710 printf(' <br> <span class="description"> URL of the item. </span>');
1672 1711 }
@@ -1673,9 +1712,9 @@
1673 1712
1674 1713 public function local_seo_email_callback()
1675 1714 {
1676 1715 printf(
1677 - '<input type="text" id="local_seo_email" name="' . Metasync_Admin::option_key . '[localseo][local_seo_email]" value="%s" size="50" />',
1716 + '<input type="text" id="local_seo_email" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_email]" value="%s" size="50" />',
1678 1717 isset(Metasync::get_option('localseo')['local_seo_email']) ? esc_attr(Metasync::get_option('localseo')['local_seo_email']) : ''
1679 1718 );
1680 1719
1681 1720 printf(' <br> <span class="description"> Search engines display your email address. </span>');
@@ -1683,9 +1722,9 @@
1683 1722
1684 1723 public function local_seo_phone_callback()
1685 1724 {
1686 1725 printf(
1687 - '<input type="text" id="local_seo_phone" name="' . Metasync_Admin::option_key . '[localseo][local_seo_phone]" value="%s" size="50" />',
1726 + '<input type="text" id="local_seo_phone" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_phone]" value="%s" size="50" />',
1688 1727 isset(Metasync::get_option('localseo')['local_seo_phone']) ? esc_attr(Metasync::get_option('localseo')['local_seo_phone']) : ''
1689 1728 );
1690 1729
1691 1730 printf(' <br> <span class="description"> Search engines may prominently display your contact phone number for mobile users. </span>');
@@ -1693,29 +1732,29 @@
1693 1732
1694 1733 public function local_seo_address_callback()
1695 1734 {
1696 1735 printf(
1697 - '<input type="text" id="local_seo_address_street" name="' . Metasync_Admin::option_key . '[localseo][address][street]" value="%s" size="50" placeholder="Street Address"/> <br>',
1736 + '<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>',
1698 1737 isset(Metasync::get_option('localseo')['address']['street']) ? esc_attr(Metasync::get_option('localseo')['address']['street']) : ''
1699 1738 );
1700 1739
1701 1740 printf(
1702 - '<input type="text" id="local_seo_address_locality" name="' . Metasync_Admin::option_key . '[localseo][address][locality]" value="%s" size="50" placeholder="Locality"/> <br>',
1741 + '<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>',
1703 1742 isset(Metasync::get_option('localseo')['address']['locality']) ? esc_attr(Metasync::get_option('localseo')['address']['locality']) : ''
1704 1743 );
1705 1744
1706 1745 printf(
1707 - '<input type="text" id="local_seo_address_region" name="' . Metasync_Admin::option_key . '[localseo][address][region]" value="%s" size="50" placeholder="Region"/> <br>',
1746 + '<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>',
1708 1747 isset(Metasync::get_option('localseo')['address']['region']) ? esc_attr(Metasync::get_option('localseo')['address']['region']) : ''
1709 1748 );
1710 1749
1711 1750 printf(
1712 - '<input type="text" id="local_seo_address_postalcode" name="' . Metasync_Admin::option_key . '[localseo][address][postalcode]" value="%s" size="50" placeholder="Postal Code"/> <br>',
1751 + '<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>',
1713 1752 isset(Metasync::get_option('localseo')['address']['postalcode']) ? esc_attr(Metasync::get_option('localseo')['address']['postalcode']) : ''
1714 1753 );
1715 1754
1716 1755 printf(
1717 - '<input type="text" id="local_seo_address_country" name="' . Metasync_Admin::option_key . '[localseo][address][country]" value="%s" size="50" placeholder="Country"/> <br>',
1756 + '<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>',
1718 1757 isset(Metasync::get_option('localseo')['address']['country']) ? esc_attr(Metasync::get_option('localseo')['address']['country']) : ''
1719 1758 );
1720 1759 }
1721 1760
@@ -1730,9 +1769,9 @@
1730 1769 <select name="<?php echo esc_attr(Metasync_Admin::option_key . '[localseo][local_seo_business_type]') ?>">
1731 1770 <option value='0'>Select Business Type</option>
1732 1771 <?php
1733 1772 foreach ($types as $type) {
1734 - printf('<option value="%s" %s >%s</option>', $type, selected($type, esc_attr($business_type)), $type);
1773 + printf('<option value="%s" %s >%s</option>', esc_attr($type), selected($type, $business_type, false), esc_html($type));
1735 1774 }
1736 1775 ?>
1737 1776 </select>
1738 1777 <?php
@@ -1756,9 +1795,9 @@
1756 1795 <li>
1757 1796 <select name="<?php echo esc_attr(Metasync_Admin::option_key . '[localseo][days][]') ?>">
1758 1797 <?php
1759 1798 foreach ($days_name as $name) {
1760 - printf('<option value="%s" %s >%s</option>', $name, selected(esc_attr($name), esc_attr($day_name)), esc_attr($name));
1799 + printf('<option value="%s" %s >%s</option>', esc_attr($name), selected($name, $day_name, false), esc_html($name));
1761 1800 }
1762 1801 ?>
1763 1802 </select>
1764 1803 <input type="text" name="<?php echo esc_attr(Metasync_Admin::option_key . '[localseo][times][]') ?>" value="<?php echo esc_attr($day_time) ?>">
@@ -1837,9 +1876,9 @@
1837 1876
1838 1877 public function local_seo_price_range_callback()
1839 1878 {
1840 1879 printf(
1841 - '<input type="text" id="local_seo_price_range" name="' . Metasync_Admin::option_key . '[localseo][local_seo_price_range]" value="%s" size="50" />',
1880 + '<input type="text" id="local_seo_price_range" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_price_range]" value="%s" size="50" />',
1842 1881 isset(Metasync::get_option('localseo')['local_seo_price_range']) ? esc_attr(Metasync::get_option('localseo')['local_seo_price_range']) : ''
1843 1882 );
1844 1883 printf(' <br> <span class="description"> The price range of the business, for example $$$. </span>');
1845 1884 }
@@ -1852,9 +1891,9 @@
1852 1891 <?php
1853 1892 $about_page = Metasync::get_option('localseo')['local_seo_about_page'] ?? '';
1854 1893 $pages = get_pages();
1855 1894 foreach ($pages as $page) {
1856 - printf('<option value="%s" %s >%s</option>', $page->ID, selected($page->ID, esc_attr($about_page)), $page->post_title);
1895 + printf('<option value="%s" %s >%s</option>', absint($page->ID), selected($page->ID, $about_page, false), esc_html($page->post_title));
1857 1896 }
1858 1897 ?>
1859 1898 </select>
1860 1899 <?php
@@ -1869,9 +1908,9 @@
1869 1908 <?php
1870 1909 $contact_page = Metasync::get_option('localseo')['local_seo_contact_page'] ?? '';
1871 1910 $pages = get_pages();
1872 1911 foreach ($pages as $page) {
1873 - printf('<option value="%s" %s >%s</option>', $page->ID, selected($page->ID, esc_attr($contact_page)), $page->post_title);
1912 + printf('<option value="%s" %s >%s</option>', absint($page->ID), selected($page->ID, $contact_page, false), esc_html($page->post_title));
1874 1913 }
1875 1914 ?>
1876 1915 </select>
1877 1916 <?php
@@ -1880,9 +1919,9 @@
1880 1919
1881 1920 public function local_seo_map_key_callback()
1882 1921 {
1883 1922 printf(
1884 - '<input type="text" id="local_seo_map_key" name="' . Metasync_Admin::option_key . '[localseo][local_seo_map_key]" value="%s" size="50" />',
1923 + '<input type="text" id="local_seo_map_key" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_map_key]" value="%s" size="50" />',
1885 1924 isset(Metasync::get_option('localseo')['local_seo_map_key']) ? esc_attr(Metasync::get_option('localseo')['local_seo_map_key']) : ''
1886 1925 );
1887 1926
1888 1927 printf(' <br> <span class="description"> An API Key is required to display embedded Google Maps on your site. </span>');
@@ -1890,9 +1929,9 @@
1890 1929
1891 1930 public function local_seo_geo_coordinates_callback()
1892 1931 {
1893 1932 printf(
1894 - '<input type="text" id="local_seo_geo_coordinates" name="' . Metasync_Admin::option_key . '[localseo][local_seo_geo_coordinates]" value="%s" size="50" />',
1933 + '<input type="text" id="local_seo_geo_coordinates" name="' . esc_attr(Metasync_Admin::option_key) . '[localseo][local_seo_geo_coordinates]" value="%s" size="50" />',
1895 1934 isset(Metasync::get_option('localseo')['local_seo_geo_coordinates']) ? esc_attr(Metasync::get_option('localseo')['local_seo_geo_coordinates']) : ''
1896 1935 );
1897 1936
1898 1937 printf(' <br> <span class="description"> Latitude and longitude values separated by comma. </span>');
@@ -1900,9 +1939,9 @@
1900 1939
1901 1940 public function header_snippets_callback()
1902 1941 {
1903 1942 printf(
1904 - '<textarea class="wide-text" id="header_snippets" rows="8" name="' . Metasync_Admin::option_key . '[codesnippets][header_snippet]" >%s</textarea>',
1943 + '<textarea class="wide-text" id="header_snippets" rows="8" name="' . esc_attr(Metasync_Admin::option_key) . '[codesnippets][header_snippet]" >%s</textarea>',
1905 1944 isset(Metasync::get_option('codesnippets')['header_snippet']) ? esc_attr(Metasync::get_option('codesnippets')['header_snippet']) : ''
1906 1945 );
1907 1946 }
1908 1947
@@ -1908,9 +1947,9 @@
1908 1947
1909 1948 public function footer_snippets_callback()
1910 1949 {
1911 1950 printf(
1912 - '<textarea class="wide-text" id="footer_snippets" rows="8" name="' . Metasync_Admin::option_key . '[codesnippets][footer_snippet]" >%s</textarea>',
1951 + '<textarea class="wide-text" id="footer_snippets" rows="8" name="' . esc_attr(Metasync_Admin::option_key) . '[codesnippets][footer_snippet]" >%s</textarea>',
1913 1952 isset(Metasync::get_option('codesnippets')['footer_snippet']) ? esc_attr(Metasync::get_option('codesnippets')['footer_snippet']) : ''
1914 1953 );
1915 1954 }
1916 1955
@@ -2047,9 +2086,9 @@
2047 2086
2048 2087 public function global_open_graph_meta_callback()
2049 2088 {
2050 2089 printf(
2051 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][open_graph_meta_tags]" value="true" %s />',
2090 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][open_graph_meta_tags]" value="true" %s />',
2052 2091 isset(Metasync::get_option('common_meta_settings')['open_graph_meta_tags']) && Metasync::get_option('common_meta_settings')['open_graph_meta_tags'] == 'true' ? 'checked' : ''
2053 2092 );
2054 2093 printf(' <br> <span class="description"> Automatically add the Open Graph meta tags in a page or post.</span>');
2055 2094 }
@@ -2056,9 +2095,9 @@
2056 2095
2057 2096 public function global_facebook_meta_callback()
2058 2097 {
2059 2098 printf(
2060 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][facebook_meta_tags]" value="true" %s />',
2099 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][facebook_meta_tags]" value="true" %s />',
2061 2100 isset(Metasync::get_option('common_meta_settings')['facebook_meta_tags']) && Metasync::get_option('common_meta_settings')['facebook_meta_tags'] == 'true' ? 'checked' : ''
2062 2101 );
2063 2102 printf(' <br> <span class="description"> Automatically add the Facebook meta tags in a page or post.</span>');
2064 2103 }
@@ -2065,9 +2104,9 @@
2065 2104
2066 2105 public function global_twitter_meta_callback()
2067 2106 {
2068 2107 printf(
2069 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][twitter_meta_tags]" value="true" %s />',
2108 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][twitter_meta_tags]" value="true" %s />',
2070 2109 isset(Metasync::get_option('common_meta_settings')['twitter_meta_tags']) && Metasync::get_option('common_meta_settings')['twitter_meta_tags'] == 'true' ? 'checked' : ''
2071 2110 );
2072 2111 printf(' <br> <span class="description"> Automatically add the Twitter meta tags in a page or post.</span>');
2073 2112 }
@@ -2075,9 +2114,9 @@
2075 2114 public function og_image_dimensions_callback()
2076 2115 {
2077 2116 $val = Metasync::get_option('common_meta_settings')['og_image_dimensions'] ?? 'true';
2078 2117 printf(
2079 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][og_image_dimensions]" value="true" %s />',
2118 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][og_image_dimensions]" value="true" %s />',
2080 2119 $val === 'true' ? 'checked' : ''
2081 2120 );
2082 2121 printf('<span class="description"> Output og:image:width, og:image:height, and og:image:type when OG image metadata is available.</span>');
2083 2122 }
@@ -2085,9 +2124,9 @@
2085 2124 public function article_timestamps_callback()
2086 2125 {
2087 2126 $val = Metasync::get_option('common_meta_settings')['article_timestamps'] ?? 'true';
2088 2127 printf(
2089 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][article_timestamps]" value="true" %s />',
2128 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][article_timestamps]" value="true" %s />',
2090 2129 $val === 'true' ? 'checked' : ''
2091 2130 );
2092 2131 printf('<span class="description"> Output article:published_time and article:modified_time from the post publish and modified dates (ISO 8601).</span>');
2093 2132 }
@@ -2095,9 +2134,9 @@
2095 2134 public function article_author_callback()
2096 2135 {
2097 2136 $val = Metasync::get_option('common_meta_settings')['article_author'] ?? 'true';
2098 2137 printf(
2099 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][article_author]" value="true" %s />',
2138 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][article_author]" value="true" %s />',
2100 2139 $val === 'true' ? 'checked' : ''
2101 2140 );
2102 2141 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>');
2103 2142 }
@@ -2105,9 +2144,9 @@
2105 2144 public function article_section_callback()
2106 2145 {
2107 2146 $val = Metasync::get_option('common_meta_settings')['article_section'] ?? 'true';
2108 2147 printf(
2109 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][article_section]" value="true" %s />',
2148 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][article_section]" value="true" %s />',
2110 2149 $val === 'true' ? 'checked' : ''
2111 2150 );
2112 2151 printf('<span class="description"> Output article:section from the primary category (falls back to first category).</span>');
2113 2152 }
@@ -2115,9 +2154,9 @@
2115 2154 public function article_tags_callback()
2116 2155 {
2117 2156 $val = Metasync::get_option('common_meta_settings')['article_tags'] ?? 'true';
2118 2157 printf(
2119 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][article_tags]" value="true" %s />',
2158 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][article_tags]" value="true" %s />',
2120 2159 $val === 'true' ? 'checked' : ''
2121 2160 );
2122 2161 printf('<span class="description"> Output one article:tag meta tag per WordPress post tag.</span>');
2123 2162 }
@@ -2125,9 +2164,9 @@
2125 2164 public function twitter_image_alt_callback()
2126 2165 {
2127 2166 $val = Metasync::get_option('common_meta_settings')['twitter_image_alt'] ?? 'true';
2128 2167 printf(
2129 - '<input type="checkbox" name="' . Metasync_Admin::option_key . '[common_meta_settings][twitter_image_alt]" value="true" %s />',
2168 + '<input type="checkbox" name="' . esc_attr(Metasync_Admin::option_key) . '[common_meta_settings][twitter_image_alt]" value="true" %s />',
2130 2169 $val === 'true' ? 'checked' : ''
2131 2170 );
2132 2171 printf('<span class="description"> Output twitter:image:alt using the stored alt text or the OG image attachment alt attribute.</span>');
2133 2172 }
@@ -2134,9 +2173,9 @@
2134 2173
2135 2174 public function facebook_page_url_callback()
2136 2175 {
2137 2176 $facebook_page_url = Metasync::get_option('social_meta')['facebook_page_url'] ?? '';
2138 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_page_url]" value="%s" size="50" />', esc_attr($facebook_page_url));
2177 + 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));
2139 2178 printf('<br><span class="description"> Enter your Facebook page URL. eg: <code>https://www.facebook.com/MetaSync/</code> </span>');
2140 2179 }
2141 2180
2142 2181 public function facebook_authorship_callback()
@@ -2141,9 +2180,9 @@
2141 2180
2142 2181 public function facebook_authorship_callback()
2143 2182 {
2144 2183 $facebook_authorship = Metasync::get_option('social_meta')['facebook_authorship'] ?? '';
2145 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_authorship]" value="%s" size="50" />', esc_attr($facebook_authorship));
2184 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][facebook_authorship]" value="%s" size="50" />', esc_attr($facebook_authorship));
2146 2185 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>');
2147 2186 }
2148 2187
2149 2188 public function facebook_admin_callback()
@@ -2148,9 +2187,9 @@
2148 2187
2149 2188 public function facebook_admin_callback()
2150 2189 {
2151 2190 $facebook_admin = Metasync::get_option('social_meta')['facebook_admin'] ?? '';
2152 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_admin]" value="%s" size="50" />', esc_attr($facebook_admin));
2191 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][facebook_admin]" value="%s" size="50" />', esc_attr($facebook_admin));
2153 2192 printf(' <br> <span class="description"> Enter numeric user ID of Facebook. </span>');
2154 2193 }
2155 2194
2156 2195 public function facebook_app_callback()
@@ -2155,9 +2194,9 @@
2155 2194
2156 2195 public function facebook_app_callback()
2157 2196 {
2158 2197 $facebook_app = Metasync::get_option('social_meta')['facebook_app'] ?? '';
2159 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_app]" value="%s" size="50" />', esc_attr($facebook_app));
2198 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][facebook_app]" value="%s" size="50" />', esc_attr($facebook_app));
2160 2199 printf(' <br> <span class="description"> Enter numeric app ID of Facebook </span>');
2161 2200 }
2162 2201
2163 2202 public function facebook_secret_callback()
@@ -2162,9 +2201,9 @@
2162 2201
2163 2202 public function facebook_secret_callback()
2164 2203 {
2165 2204 $facebook_secret = Metasync::get_option('social_meta')['facebook_secret'] ?? '';
2166 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][facebook_secret]" value="%s" size="50" />', esc_attr($facebook_secret));
2205 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][facebook_secret]" value="%s" size="50" />', esc_attr($facebook_secret));
2167 2206 printf(' <br> <span class="description"> Enter alphanumeric access token from Facebook. </span>');
2168 2207 }
2169 2208
2170 2209 public function twitter_username_callback()
@@ -2169,9 +2208,9 @@
2169 2208
2170 2209 public function twitter_username_callback()
2171 2210 {
2172 2211 $twitter_username = Metasync::get_option('social_meta')['twitter_username'] ?? '';
2173 - printf('<input type="text" name="' . Metasync_Admin::option_key . '[social_meta][twitter_username]" value="%s" size="50" />', esc_attr($twitter_username));
2212 + printf('<input type="text" name="' . esc_attr(Metasync_Admin::option_key) . '[social_meta][twitter_username]" value="%s" size="50" />', esc_attr($twitter_username));
2174 2213 printf(' <br> <span class="description"> Twitter username of the author to add <code>twitter:creator</code> tag to post. eg: <code>MetaSync</code> </span>');
2175 2214 }
2176 2215
2177 2216 public static function get_business_types()