admin_instance = $admin; } // ──────────────────────────────────────────────────────────────── // Accordion / Section helpers // ──────────────────────────────────────────────────────────────── public function get_accordion_sections_config() { return array( 'connection' => array( 'title' => 'Connection & Authentication', 'description' => 'Manage your API connection and authentication settings', 'icon' => 'admin-network', 'priority' => 10, 'default_open' => true, 'fields' => array( 'searchatlas_api_key', 'apikey' ) ), 'otto_ssr' => array( 'title' => Metasync::get_whitelabel_otto_name() . ' Server-Side Rendering', 'description' => 'Configure ' . Metasync::get_whitelabel_otto_name() . ' rendering and display options', 'icon' => 'performance', 'priority' => 20, 'default_open' => false, 'fields' => array( 'otto_pixel_uuid', 'otto_disable_on_loggedin', 'otto_disable_preview_button', 'otto_wp_rocket_compat', ) ), 'edge_cache' => array( 'title' => 'Edge Cache / CDN', 'description' => 'Configure CDN credentials for cache-tag purging', 'icon' => 'admin-site-alt3', 'priority' => 22, 'default_open' => false, 'render_callback' => array('Metasync_Edge_Cache_Settings', 'render'), ), 'bot_detection' => array( 'title' => 'Bot Detection & Filtering', 'description' => 'Manage bot traffic and reduce unnecessary API calls', 'icon' => 'filter', 'priority' => 25, 'default_open' => false, 'fields' => array( 'otto_disable_for_bots', 'otto_bot_whitelist', 'otto_bot_blacklist', 'otto_bot_statistics_link' ) ), 'breadcrumbs' => array( 'title' => 'Breadcrumbs', 'description' => 'Configure breadcrumb navigation display', 'icon' => 'format-links', 'priority' => 35, 'default_open' => false, 'render_callback' => array($this, 'render_breadcrumbs_section') ), 'open_graph' => array( 'title' => 'Open Graph', 'description' => 'Control which Open Graph and article meta tags are output', 'icon' => 'share', 'priority' => 38, 'default_open' => false, 'fields' => array( 'og_image_dimensions', 'article_timestamps', 'article_author', 'article_section', 'article_tags', 'twitter_image_alt' ) ), 'editor_settings' => array( 'title' => 'Post/Page Editor Settings', 'description' => 'Customize meta boxes and editor functionality', 'icon' => 'edit', 'priority' => 40, 'default_open' => false, 'fields' => array( 'disable_common_robots_metabox', 'disable_advance_robots_metabox', 'disable_redirection_metabox', 'disable_canonical_metabox', 'disable_social_opengraph_metabox', 'disable_schema_markup_metabox', 'disable_seo_metabox', 'open_external_links' ) ), 'user_management' => array( 'title' => 'User Management for Content', 'description' => 'Configure which users are allowed to be authors of content synced.', 'icon' => 'groups', 'priority' => 50, 'default_open' => false, 'fields' => array( 'content_genius_sync_roles' ) ), 'content_rendering' => array( 'title' => 'Content Rendering', 'description' => 'Configure how synced content is stored and rendered by your page builder', 'icon' => 'admin-appearance', 'priority' => 55, 'default_open' => false, 'fields' => array( 'default_page_builder' ) ), 'llms_txt' => array( 'title' => 'LLMs.txt', 'description' => 'Publish a standards-compliant /llms.txt so AI search engines and assistants can discover your content', 'icon' => 'media-text', 'priority' => 56, 'default_open' => false, 'render_callback' => array($this, 'render_llms_txt_section'), ), 'advanced' => array( 'title' => 'Plugin Settings', 'description' => 'System configuration and maintenance options', 'icon' => 'admin-settings', 'priority' => 60, 'default_open' => false, 'fields' => array( 'permalink_structure', 'hide_dashboard_framework', 'show_admin_bar_status', 'enable_auto_updates', 'import_external_data' ) ) ); } public function get_advanced_accordion_config() { $config = array(); $user = wp_get_current_user(); if (in_array('administrator', (array) $user->roles)) { $config['plugin_access'] = array( 'title' => 'User Roles with Plugin Access', 'description' => 'Control which user roles can see and access this plugin', 'icon' => 'admin-users', 'priority' => 5, 'default_open' => false, 'render_callback' => array($this, 'render_plugin_access_roles_section') ); } $config['debug_mode'] = array( 'title' => 'Debug Mode', 'description' => 'Manage debug mode with automatic disable and safety limits', 'icon' => 'info', 'priority' => 8, 'default_open' => false, 'render_callback' => array($this->admin_instance, 'render_debug_mode_section') ); $config['error_logs'] = array( 'title' => 'Error Logs', 'description' => 'View and manage error logs to troubleshoot issues', 'icon' => 'warning', 'priority' => 10, 'default_open' => true, 'render_callback' => array($this->admin_instance, 'render_error_log_content') ); $config['execution_settings'] = array( 'title' => 'Execution Settings', 'description' => 'Configure resource limits and execution parameters', 'icon' => 'controls-play', 'priority' => 15, 'default_open' => false, 'render_callback' => array($this, 'render_execution_settings_section') ); $config['otto_cache'] = array( 'title' => 'Cache Management', 'description' => 'Manage ' . Metasync::get_whitelabel_otto_name() . ' cache and clear all cache plugins', 'icon' => 'database', 'priority' => 20, 'default_open' => false, 'render_callback' => array($this->admin_instance, 'render_otto_cache_management') ); $config['db_cleanup'] = array( 'title' => 'Database Cleanup', 'description' => 'Remove orphaned data and schedule automated weekly cleanup', 'icon' => 'trash', 'priority' => 25, 'default_open' => false, 'render_callback' => array($this->admin_instance, 'render_db_cleanup_section') ); $config['performance'] = array( 'title' => 'Performance & CPU Load', 'description' => 'Configure CPU load thresholds to prevent processing during peak server load', 'icon' => 'chart-line', 'priority' => 27, 'default_open' => false, 'render_callback' => array($this->admin_instance, 'render_cpu_monitor_section') ); $config['reset_settings'] = array( 'title' => 'Reset Plugin Settings', 'description' => 'Reset all plugin settings to default values', 'icon' => 'update', 'priority' => 30, 'default_open' => false, 'render_callback' => array($this, 'render_reset_settings_section') ); return $config; } public function render_advanced_accordion() { $sections_config = $this->get_advanced_accordion_config(); uasort($sections_config, function($a, $b) { return $a['priority'] - $b['priority']; }); echo '
'; } public function render_reset_settings_section() { ?>This action will permanently delete:
You will need to reconfigure the plugin completely after this reset.
IndexNow is a simple protocol that allows websites to instantly notify search engines about URL changes. It's supported by Bing, Yandex, Naver, Seznam, and other search engines.
Resources: IndexNow Documentation | Bing Webmaster Tools
IndexNow API Configured
API Key:
Configuration Required
Configure your IndexNow API key below to enable instant indexing with Bing and other search engines.
|
Your IndexNow API key is required to submit URLs for instant indexing. You can generate a random key or use your own (32+ character hexadecimal string). After saving, a verification file will be automatically created at your site root. |
|
|
Select which endpoint to use for submitting URLs. The IndexNow.org endpoint is recommended as it notifies multiple search engines at once. |
|
|
Selected post types will be automatically submitted to IndexNow when published or updated. |
|
Select which user roles can see and access this plugin's menu, settings, and options in the WordPress admin area.
Configure resource limits and execution parameters for plugin operations. Adjust these settings based on your server capabilities.
| '; if (!empty($field['title'])) { echo ''; } echo ' | '; echo ''; call_user_func($field['callback'], $field['args']); echo ' | '; echo '
|---|
%s %s
', $status_message, $refresh_help); } public function linkgraph_token_callback() { printf( '', isset(Metasync::get_option('general')['linkgraph_token']) ? esc_attr(Metasync::get_option('general')['linkgraph_token']) : '' ); printf( '', isset(Metasync::get_option('general')['linkgraph_customer_id']) ? esc_attr(Metasync::get_option('general')['linkgraph_customer_id']) : '' ); ?> diff($ago); $string = [ 'y' => 'year', 'm' => 'month', 'w' => 'week', 'd' => 'day', 'h' => 'hour', 'i' => 'minute', 's' => 'second', ]; foreach ($string as $k => &$v) { if (isset($diff->$k) && $diff->$k) { $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : ''); } else { unset($string[$k]); } } if (!$full) $string = array_slice($string, 0, 1); return $string ? implode(', ', $string) . ' ago' : 'just now'; } public function searchatlas_api_key_callback() { $current_api_key = isset(Metasync::get_option('general')['searchatlas_api_key']) ? esc_attr(Metasync::get_option('general')['searchatlas_api_key']) : ''; $otto_uuid = isset(Metasync::get_option('general')['otto_pixel_uuid']) ? Metasync::get_option('general')['otto_pixel_uuid'] : ''; $has_api_key = !empty($current_api_key); $has_otto_uuid = !empty($otto_uuid); $is_fully_connected = $this->admin_instance->is_heartbeat_connected(); printf(''); printf(''); if ($is_fully_connected) { printf('Your %s API key for secure communication with the platform. Use the authentication button above to refresh or change accounts.', esc_html(Metasync::get_effective_plugin_name())); } elseif ($has_api_key && !$has_otto_uuid) { printf('Your API key is configured but %s UUID is missing. Re-authenticate above to complete the setup and enable dashboard access.', esc_html(Metasync::get_whitelabel_otto_name())); } else { printf('This field will be automatically populated when you authenticate using the button above. You can also manually enter your API key if you have one.'); } printf('
'); ?>Manual Authentication: If you manually enter your API Key and OTTO UUID, you also consent to the same AI-powered automation permissions described above.
'); if( isset(Metasync::get_option('general')['searchatlas_api_key'])&&Metasync::get_option('general')['searchatlas_api_key']!=''){ $timestamp = @Metasync::get_option('general')['send_auth_token_timestamp']; printf( '%s (%s)
', esc_attr($timestamp), $this->time_elapsed_string($timestamp) ); } } public function bing_site_verification_callback() { printf( '', isset(Metasync::get_option('searchengines')['bing_site_verification']) ? esc_attr(Metasync::get_option('searchengines')['bing_site_verification']) : '' ); printf('noindex is useful for avoiding indexation of thin content pages and dilution of page rank. As soon as a post is added, the page is updated to index. ');
}
public function no_follow_links_callback()
{
printf(
'',
isset(Metasync::get_option('optimal_settings')['no_follow_links']) && Metasync::get_option('optimal_settings')['no_follow_links'] == 'true' ? 'checked' : ''
);
printf(' rel="nofollow" attribute to external links appearing in your posts, pages, and other post types. The attribute is dynamically applied when the url is displayed');
}
public function open_external_links_callback()
{
printf(
'',
isset(Metasync::get_option('optimal_settings')['open_external_links']) && Metasync::get_option('optimal_settings')['open_external_links'] == 'true' ? 'checked' : ''
);
printf(' target="_blank" attribute to external links appearing in your posts, pages, and other post types. The attribute is applied when the url is displayed.');
}
public function add_alt_image_tags_callback()
{
printf(
'',
isset(Metasync::get_option('optimal_settings')['add_alt_image_tags']) && Metasync::get_option('optimal_settings')['add_alt_image_tags'] == 'true' ? 'checked' : ''
);
printf(' alt attribute to Image Tags appearing in your posts, pages, and other post types. The attribute is applied when the content is displayed.');
}
public function add_title_image_tags_callback()
{
printf(
'',
isset(Metasync::get_option('optimal_settings')['add_title_image_tags']) && Metasync::get_option('optimal_settings')['add_title_image_tags'] == 'true' ? 'checked' : ''
);
printf(' title attribute to Image Tags appearing in your posts, pages, and other post types. The attribute is applied when the content is displayed.');
}
public function site_type_callback()
{
$site_type = Metasync::get_option('optimal_settings')['site_info']['type'] ?? '';
$types = [
['name' => 'Personal Blog', 'value' => 'blog'],
['name' => 'Community Blog/News Site', 'value' => 'news'],
['name' => 'Personal Portfolio', 'value' => 'portfolio'],
['name' => 'Small Business Site', 'value' => 'business'],
['name' => 'Webshop', 'value' => 'webshop'],
['name' => 'Other Personal Website', 'value' => 'otherpersonal'],
['name' => 'Other Business Website', 'value' => 'otherbusiness'],
];
?>
',
$company_name ? $company_name : get_bloginfo('name')
);
}
public function site_google_logo_callback()
{
$google_logo = Metasync::get_option('optimal_settings')['site_info']['google_logo'] ?? '';
printf(
'',
$google_logo
);
printf(' https://www.facebook.com/MetaSync/ ');
}
public function facebook_authorship_callback()
{
$facebook_authorship = Metasync::get_option('social_meta')['facebook_authorship'] ?? '';
printf('', esc_attr($facebook_authorship));
printf('https://www.facebook.com/shahrukh/ ');
}
public function facebook_admin_callback()
{
$facebook_admin = Metasync::get_option('social_meta')['facebook_admin'] ?? '';
printf('', esc_attr($facebook_admin));
printf(' twitter:creator tag to post. eg: MetaSync ');
}
public static function get_business_types()
{
$business_type = [
'Airline',
'Consortium',
'Corporation',
'Educational Organization',
'College Or University',
'Elementary School',
'High School',
'Middle School',
'Preschool',
'School',
'Funding Scheme',
'Government Organization',
'Library System',
'Local Business',
'Animal Shelter',
'Archive Organization',
'Automotive Business',
'Auto Body Shop',
'Auto Dealer',
'Auto Parts Store',
'Auto Rental',
'Auto Repair',
'Auto Wash',
'Gas Station',
'Motorcycle Dealer',
'Motorcycle Repair',
'Child Care',
'Dry Cleaning Or Laundry',
'Emergency Service',
'Fire Station',
'Hospital',
'Police Station',
'Employment Agency',
'Entertainment Business',
'Adult Entertainment',
'Amusement Park',
'Art Gallery',
'Casino',
'Comedy Club',
'Movie Theater',
'Night Club',
'Financial Service',
'Accounting Service',
'Automated Teller',
'Bank Or CreditUnion',
'Insurance Agency',
'Food Establishment',
'Bakery',
'Bar Or Pub',
'Brewery',
'Cafe Or CoffeeShop',
'Distillery',
'Fast Food Restaurant',
'IceCream Shop',
'Restaurant',
'Winery',
'Government Office',
'Post Office',
'Health And Beauty Business',
'Beauty Salon',
'Day Spa',
'Hair Salon',
'Health Club',
'Nail Salon',
'Tattoo Parlor',
'Home And Construction Business',
'Electrician',
'General Contractor',
'HVAC Business',
'House Painter',
'Locksmith',
'Moving Company',
'Plumber',
'Roofing Contractor',
'Internet Cafe',
'Legal Service',
'Attorney',
'Notary',
'Library',
'Lodging Business',
'Bed And Breakfast',
'Campground',
'Hostel',
'Hotel',
'Motel',
'Resort',
'Ski Resort',
'Medical Business',
'Community Health',
'Dentist',
'Dermatology',
'Diet Nutrition',
'Emergency',
'Geriatric',
'Gynecologic',
'Medical Clinic',
'Optician',
'Pharmacy',
'Physician',
'Professional Service',
'Radio Station',
'Real Estate Agent',
'Recycling Center',
'Self Storage',
'Shopping Center',
'Sports Activity Location',
'Bowling Alley',
'Exercise Gym',
'Golf Course',
'Public Swimming Pool',
'Ski Resort',
'Sports Club',
'Stadium Or Arena',
'Tennis Complex',
'Store',
'Bike Store',
'Book Store',
'Clothing Store',
'Computer Store',
'Convenience Store',
'Department Store',
'Electronics Store',
'Florist',
'Furniture Store',
'Garden Store',
'Grocery Store',
'Hardware Store',
'Hobby Shop',
'Home Goods Store',
'Jewelry Store',
'Liquor Store',
'Mens Clothing Store',
'Mobile Phone Store',
'Movie Rental Store',
'Music Store',
'Office Equipment Store',
'Outlet Store',
'Pawn Shop',
'Pet Store',
'Shoe Store',
'Sporting GoodsStore',
'Tire Shop',
'Toy Store',
'Wholesale Store',
'Television Station',
'Tourist Information Center',
'Travel Agency',
'Tree Services',
'Medical Organization',
'Diagnostic Lab',
'Veterinary Care',
'NGO',
'News Media Organization',
'Performing Group',
'Dance Group',
'Music Group',
'Theater Group',
'Project',
'Funding Agency',
'Research Project',
'Sports Organization',
'Sports Team',
'Workers Union',
];
return $business_type;
}
/**
* Render breadcrumbs settings section
*/
public function render_breadcrumbs_section() {
$options = Metasync::get_option('breadcrumbs', array());
$defaults = array(
'enabled' => true,
'separator' => '»',
'home_label' => 'Home',
'home_url' => '',
'show_current_page' => true,
'prefix_text' => '',
'archive_label_format' => '{name}',
'disable_schema' => false,
);
$options = wp_parse_args($options, $defaults);
?>
Enable or disable breadcrumb navigation on your site
When checked, MetaSync will not output the BreadcrumbList JSON-LD in <head>. Use this if another SEO plugin already handles breadcrumb schema.
Choose how to separate breadcrumb items
Label for the home/root breadcrumb item
Leave empty to use your site home URL
Include the current page as the last (unlinked) breadcrumb item
Optional text to display before the breadcrumbs (leave empty for none)
Use {name} as a placeholder for the archive name. Example: Category: {name}