'; if(function_exists('siteseo_admin_header')){ siteseo_admin_header(); } $current_tab = isset($_GET['tab']) ? sanitize_key($_GET['tab']) : 'tab_siteseopro_woocommerce'; // Default tab $siteseopro_settings_tabs = [ 'tab_siteseopro_woocommerce' => esc_html__('WooCommerce', 'siteseo-pro'), 'tab_siteseopro_easydigital_downloads' => esc_html__('Easy Digital Downloads', 'siteseo-pro'), 'tab_siteseopro_pagespeed_insights' => esc_html__('PageSpeed Insights', 'siteseo-pro'), 'tab_siteseopro_dublin_core' => esc_html__('Dublin Core', 'siteseo-pro'), 'tab_siteseopro_local_business' => esc_html__('Local Business', 'siteseo-pro'), 'tab_siteseopro_structured_data' => esc_html__('Structured Data Types', 'siteseo-pro'), 'tab_siteseopro_breadcrumbs' => esc_html__('Breadcrumbs','siteseo-pro'), 'tab_siteseopro_robots_txt' => esc_html__('robots.txt','siteseo-pro'), 'tab_siteseopro_htaccess' => esc_html__('htaccess','siteseo-pro'), 'tab_siteseopro_redirect_monitor' => esc_html__('Redirections / 404 monitoring', 'siteseo-pro'), 'tab_google_news' => esc_html__('Google News', 'siteseo-pro'), ]; echo'
'; $sitesepro_license = get_option('siteseo_license'); // TODO:: Will make it visible later. // if(empty($sitesepro_license['license'])){ // echo'
'; // $docs = siteseo_get_docs_links(); // echo'
//

' . __('Welcome to SiteSEO PRO!', 'siteseo-pro') . '

//

' . __('Please activate your license to receive automatic updates and get premium support.', 'siteseo-pro') . '

//

' . __('Activate License', 'siteseo-pro') . '

//
//
'; // } echo''.esc_html('SiteSEO - PRO','siteseo-pro').''; wp_nonce_field('sitseo_pro_settings'); echo '
'; siteseo_submit_button(__('Save changes', 'siteseo-pro')); echo '
'; } static function woocommerce_tab(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } $options = $siteseo->pro; // Check if settings are enable $cart_page = !empty($options['woocommerce_cart_page_no_index']); $checkout_page = !empty($options['woocommerce_checkout_page_no_index']); $account_page = !empty($options['woocommerce_customer_account_page_no_index']); $woo_og_price = !empty($options['woocommerce_product_og_price']); $woo_og_currency = !empty($options['woocommerce_product_og_currency']); $woo_meta_generator = !empty($options['woocommerce_meta_generator']); $schema_output = !empty($options['woocommerce_schema_output']); $schema_breadcrumbs = !empty($options['woocommerce_schema_breadcrumbs_output']); $toggle_state_woocommerce = !empty($options['toggle_state_woocommerce']) ? $options['toggle_state_woocommerce'] : ''; $nonce = wp_create_nonce('siteseo_pro_toggle_nonce'); echo'

'.esc_html('WooCommerce','siteseo-pro').'

'; Util::render_toggle('woocommerce', $toggle_state_woocommerce, $nonce); if(!is_plugin_active('woocommerce/woocommerce.php')){ echo'

'.wp_kses_post(__('You need to enable WooCommerce to apply these settings.', 'siteseo-pro')).'

'; } echo'
Cart page

' . esc_html__('If your theme or plugin displays the cart across your entire WordPress site, don\'t enable this option.', 'siteseo-pro') . '

Checkout page
Customer account pages
OG Price
' . esc_html('') . '
OG Currency
' . esc_html('') .'
Remove WooCommerce generator tag in your head
' . esc_html('') . '
Remove WooCommerce Schemas

'. wp_kses_post(sprintf(__('The default product schema added by WooCommerce generates errors in Google Search Console. Disable it and create your own automatic product schema.', 'siteseo-pro'), esc_url(admin_url('edit.php?post_type=siteseo_schemas')))) . '

Remove WooCommerce breadcrumbs schemas only

' . esc_html__('If "Remove default JSON-LD structured data (WooCommerce 3+)" option is already checked, the breadcrumbs schema is already removed from your source code.', 'siteseo-pro') . '

'; } static function easy_digital_downloads_tab() { if(!empty($_POST['submit'])){ self::save_settings(); } $options = get_option('siteseo_pro_options'); // check settings enable $option_og_price = isset($options['edd_product_og_price']) ? $options['edd_product_og_price'] : ''; $option_og_currency = isset($options['edd_product_og_currency']) ? $options['edd_product_og_currency'] : ''; $option_meta_generator = isset($options['edd_meta_generator']) ? $options['edd_meta_generator'] : ''; $toggle_state_easy_digital = isset($options['toggle_state_easy_digital']) ? $options['toggle_state_easy_digital'] : ''; $nonce = wp_create_nonce('siteseo_pro_toggle_nonce'); echo'

'.esc_html('Easy Digital Downloads','siteseo-pro').'

'; Util::render_toggle('edd', $toggle_state_easy_digital, $nonce); echo'

'.esc_html__('Improve Easy Digital Downloads SEO', 'siteseo-pro').'

'; if(!is_plugin_active('easy-digital-downloads/easy-digital-downloads.php')){ echo '

'. wp_kses_post(__('You need to enable Easy Digital Downloads to apply these settings.', 'siteseo-pro')) .'

'; } echo'' . '' . '' . '' . '
OG price ' . '
' . esc_html('') . '
OG Currency' . '
' . esc_html('') . '
'.esc_html__('Remove Easy Digital Downloads generator tag in your head', 'siteseo-pro').'' . '
' . esc_html('') . '
'; } static function pagespeed_insights_tab(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } // check settings enable $check_api_key = !empty($siteseo->pro['ps_api_key']) ? $siteseo->pro['ps_api_key'] : ''; $docs = function_exists('siteseo_get_docs_links') ? siteseo_get_docs_links() : ''; echo'

'.esc_html('PageSpeed Insights','siteseo-pro').'

'.esc_html__('Check your site performance with Google PageSpeed Insights.', 'siteseo-pro').'

'.esc_html__('Learn how your site has performed, based on data from your actual users around the world.', 'siteseo-pro').'

' . ''; echo sprintf( ''; echo'
'.esc_html__('Enter your own Google Page Speed API key', 'siteseo-pro').'', esc_html__('Google Page Speed Insights API key', 'siteseo-pro'), esc_html__('Enter your Page Speed Insights API key', 'siteseo-pro'), esc_html($check_api_key) ); echo '

' . esc_html__('Learn how to create a free Google Page Speed API key', 'siteseo-pro') . '

' . esc_html__('A Page Speed Insights key is required to avoid quota errors.', 'siteseo-pro') . '

'; echo '
'; echo'
'; $page_speed = get_option('siteseo_pro_page_speed', []); if(!empty($page_speed['mobile']) && !empty($page_speed['desktop'])){ PageSpeed::analysis(); } echo'

'; } static function dublin_core_tab(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } $dublin_core = !empty($siteseo->pro['dublin_core_enable']); $toggle_state_dublin_core = !empty($siteseo->pro['toggle_state_dublin_core']) ? $siteseo->pro['toggle_state_dublin_core'] : ''; $nonce = wp_create_nonce('siteseo_pro_toggle_nonce'); echo'

'.esc_html('Dublin Core','siteseo-pro').'

'; Util::render_toggle('dublin', $toggle_state_dublin_core, $nonce); echo'
' . esc_html__('Dublin Core is a set of meta tags to describe your content','siteseo-pro') . '
' . esc_html__('These tags are automatically generated. Recognized by states / governments, they are used by directories, Bing, Baidu and Yandex.','siteseo-pro') . '' . ''. '
'.esc_html__('Enable Dublin Core', 'siteseo-pro').'
'; } static function local_business_tab(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } // Time slots $days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; $hours = range('00', '23'); $mins = ['00', '15', '30', '45', '59']; if(isset($_POST['siteseo_pro_options']) && is_array($_POST['siteseo_pro_options'])){ $siteseo_pro_options = map_deep(wp_unslash($_POST['siteseo_pro_options']), 'sanitize_text_field'); } $business_type['LocalBusiness'] = 'Local Business (default)'; $business_type['AnimalShelter'] = 'Animal Shelter'; $business_type['ChildCare'] = 'Child Care'; $business_type['DryCleaningOrLaundry'] = 'Dry Cleaning Or Laundry'; $business_type['EmergencyService'] = 'Emergency Service'; $business_type['FireStation'] = '|-FireStation'; $business_type['Hospital'] = '|-Hospital'; $business_type['PoliceStation'] = '|-Police Station'; $business_type['EmploymentAgency'] = 'Employment Agency'; $business_type['Entertainment Business'] = 'Entertainment Business'; $business_type['AdultEntertainment'] = '|-AdultEntertainment'; $business_type['AmusementPark'] = '|-Amusement Park'; $business_type['ArtGallery'] = '|-Art Gallery'; $business_type['Casino'] = '|-Casino'; $business_type['ComedyClub'] = '|-Comedy Club'; $business_type['MovieTheater'] = '|-Movie Theater'; $business_type['NightClub'] = '|-Night Club'; $business_type['FinancialService'] = '|-Financial Service'; $business_type['AccountingService'] = '|-Accounting Service'; $business_type['AutomatedTeller'] = '|-Automated Teller'; $business_type['BankOrCreditUnion'] = '|-Bank Or CreditUnion'; $business_type['InsuranceAgency'] = '|-Insurance Agency'; $business_type['FoodEstablishment'] = 'Food Establishment'; $business_type['Bakery'] = '|-Bakery'; $business_type['BarOrPub'] = '|-Bar Or Pub'; $business_type['Brewery'] = 'Brewery'; $business_type['CafeOrCoffeeShop'] = '|-Cafe Or CoffeeShop'; $business_type['FastFoodRestaurant'] = '|-Fast Food Restaurant'; $business_type['IceCreamShop'] = '|-Ice Cream Shop'; $business_type['Restaurant'] = '|-Restaurant'; $business_type['Winery'] = '|-Winery'; $business_type['GovernmentOffice'] = 'Government Office'; $business_type['PostOffice'] = '|-PostOffice'; $business_type['HealthAndBeautyBusiness'] = 'Health And Beauty Business'; $business_type['BeautySalon'] = '|-Beauty Salon'; $business_type['DaySpa'] = '|-DaySpa'; $business_type['HairSalon'] = '|-Hair Salon'; $business_type['HealthClub'] = '|-Health Club'; $business_type['NailSalon'] = '|-Nail Salon'; $business_type['TattooParlor'] = '|-Tattoo Parlor'; $business_type['HomeAndConstructionBusiness'] = '|-Home And Construction Business'; $business_type['Electrician'] = '|-Electrician'; $business_type['HVACBusiness'] = '|-HVAC Business'; $business_type['HousePainter'] = '|-House Painter'; $business_type['Locksmith'] = '|-Locksmith'; $business_type['MovingCompany'] = '|-MovingCompany'; $business_type['Plumber'] = '|-Plumber'; $business_type['RoofingContractor'] = '|-Roofing Contractor'; $business_type['InternetCafe'] = '|-Internet Cafe'; $business_type['MedicalBusiness'] = '|-Medical Business'; $business_type['CommunityHealth'] = '|-Community Health'; $business_type['Dentist'] = '|-Dentist'; $business_type['Dermatology'] = '|-Dermatology'; $business_type['DietNutrition'] = '|-Diet Nutrition'; $business_type['Emergency'] = '|-Emergency'; $business_type['Gynecologic'] = '|-Gynecologic'; $business_type['MedicalClinic'] = '|-MedicalClinic'; $business_type['Midwifery'] = '|-Midwifery'; $business_type['Nursing'] = '|-Nursing'; $business_type['Obstetric'] = '|-Obstetric'; $business_type['Oncologic'] = '|-Oncologic'; $business_type['Optician'] = '|-Optician'; $business_type['Otolaryngologic'] = '|-Otolaryngologic'; $business_type['Pediatric'] = '|-Pediatric'; $business_type['Pharmacy'] = '|-Pharmacy'; $business_type['Physiotherapy'] = '|-Physiotherapy'; $business_type['PlasticSurgery'] = '|-PlasticSurgery'; $business_type['Podiatric'] = '|-Podiatric'; $business_type['PrimaryCare'] = '|-PrimaryCare'; $business_type['Psychiatric'] = '|-Psychiatric'; $business_type['PublicHealth'] = '|-PublicHealth'; $business_type['VeterinaryCare'] = '|-VeterinaryCare'; $business_type['LegalService'] = '|-LegalService'; $business_type['Attorney'] = '|-Attorney'; $business_type['Notary'] = '|-Notary'; $business_type['Library'] = 'Library'; $business_type['LodgingBusiness'] = 'LodgingBusiness'; $business_type['BedAndBreakfast'] = '|-Bed And Breakfast'; $business_type['Campground'] = '|-Campground'; $business_type['Hostel'] = '|-Hostel'; $business_type['Hotel'] = '|-Hotel'; $business_type['Motel'] = '|-Motel'; $business_type['Resort'] ='|-Resort'; $business_type['ProfessionalService'] ='Professional Service'; $business_type['RadioStation'] ='Radio Station'; $business_type['RealEstateAgent'] ='Real Estate Agent'; $business_type['RecyclingCenter'] ='Recycling Center'; $business_type['SelfStorage'] ='Real Self Storage'; $business_type['ShoppingCenter'] ='ShoppingCenter'; $business_type['SportsActivityLocation'] ='Sports Activity Location'; $business_type['BowlingAlley'] ='|-Bowling Alley'; $business_type['ExerciseGym'] = '|-Exercise Gym'; $business_type['GolfCourse'] = '|-Golf Course'; $business_type['HealthClub'] = '|-HealthClub'; $business_type['PublicSwimmingPool'] = '|-Public Swimming Pool'; $business_type['SkiResort'] = '|-Ski Resort'; $business_type['SportsClub'] = '|-Sports Club'; $business_type['StadiumOrArena'] = '|-Stadium Or Arena'; $business_type['TennisComplex'] = '|-Tennis Complex'; $business_type['Store'] = '|-Store'; $business_type['AutoPartsStore'] = '|-Auto Parts Store'; $business_type['BikeStore'] = '|-Bike Store'; $business_type['BookStore'] = '|-Book Store'; $business_type['ClothingStore'] = '|-Clothing Store'; $business_type['ComputerStore'] = '|-Computer Store'; $business_type['ConvenienceStore'] = '|-Convenience Store'; $business_type['DepartmentStore'] = '|-Department Store'; $business_type['ElectronicsStore'] = '|-Electronics Store'; $business_type['Florist'] = '|-Florist'; $business_type['FurnitureStore'] = '|-Furniture Store'; $business_type['GardenStore'] = '|-Garden Store'; $business_type['GroceryStore'] = '|-Grocery Store'; $business_type['HardwareStore'] = '|-Hardware Store'; $business_type['HobbyShop'] = '|-Hobby Shop'; $business_type['HomeGoodsStore'] = '|-Home Goods Store'; $business_type['JewelryStore'] = '|-Jewelry Store'; $business_type['LiquorStore'] = '|-Liquor Store'; $business_type['MensClothingStore'] = '|-Mens Clothing Store'; $business_type['MobilePhoneStore'] = '|-Mobile Phone Store'; $business_type['MovieRentalStore'] = '|-Movie Rental Store'; $business_type['MusicStore'] = '|-Music Store'; $business_type['OfficeEquipmentStore'] = '|-Office Equipment Store'; $business_type['OutletStore'] = '|-Outlet Store'; $business_type['PawnShop'] = '|-Pawn Shop'; $business_type['PetStore'] = '|-PetStore'; $business_type['ShoeStore'] = '|-Shoe Store'; $business_type['SportingGoodsStore'] = '|-Sporting Goods Store'; $business_type['TireShop'] = '|-Tire Shop'; $business_type['ToyStore'] = '|-Toy Store'; $business_type['WholesaleStore'] = '|-Whole sale Store'; $business_type['TelevisionStation'] = '|-Whole sale Store'; $business_type['TouristInformationCenter'] = 'Tourist Information Center'; $business_type['TravelAgency'] = 'Travel Agency'; $business_type['AutomotiveBusiness'] = 'Automotive Business'; $business_type['AutoBodyShop'] = '|-Auto Body Shop'; $business_type['AutoDealer'] = '|-Auto Dealer'; $business_type['AutoPartsStore'] = '|-Auto Parts Store'; $business_type['AutoRental'] = '|-Auto Rental'; $business_type['AutoRepair'] = '|-Auto Repair'; $business_type['AutoWash'] = '|-AutoWash'; $business_type['GasStation'] = '|-Gas Station'; $business_type['MotorcycleDealer'] = '|-Motorcycle Dealer'; $business_type['MotorcycleRepair'] = '|-MotorcycleRepair'; // Get saved settings $options = $siteseo->pro; $display_schema = isset($options['local_business_display_schema']) ? esc_attr($options['local_business_display_schema']) : ''; $set_street_address = isset($options['street_address']) ? esc_attr($options['street_address']): ''; $set_city = isset($options['city']) ? esc_attr($options['city']): ''; $set_state = isset($options['state']) ? esc_attr($options['state']): ''; $set_postal_code = isset($options['postal_code']) ? esc_attr($options['postal_code']) : '' ; $set_country = isset($options['country']) ? esc_attr($options['country']): ''; $set_latitude = isset($options['latitude'])? esc_attr($options['latitude']): ''; $set_longitude = isset($options['longitude']) ? esc_attr($options['longitude']) : ''; $set_place_id = isset($options['place_id']) ? esc_attr($options['place_id']) : ''; $set_url = isset($options['url']) ? esc_attr($options['url']) : ''; $set_telephone = isset($options['telephone']) ? esc_attr($options['telephone']): ''; $set_price_range = isset($options['price_range']) ? esc_attr($options['price_range']) : ''; $set_cuisine_served = isset($options['cuisine_served'])? esc_attr($options['cuisine_served']) : ''; $set_accepts_reser = isset($options['accepts_reser']) ? esc_attr($options['accepts_reser']) : ''; $set_business_type = isset($options['business_type']) ? esc_attr($options['business_type']) : 'LocalBusiness'; $toggle_state_local_buz = isset($options['toggle_state_local_buz']) ? esc_html($options['toggle_state_local_buz']): ''; $nonce = wp_create_nonce('siteseo_pro_toggle_nonce'); $docs = siteseo_get_docs_links(); // Display the settings form echo'

'.esc_html('Local Business','siteseo-pro').'

'; Util::render_toggle('local', $toggle_state_local_buz, $nonce); echo'

'.esc_html__('Local Business data type for Google', 'siteseo-pro').'

'; wp_nonce_field('sitseo_pro_settings', 'sitseo_pro_settings_nonce'); echo'
Business type
Street Address

' . sprintf('%s %s.', esc_html__('Required', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

City

' . sprintf('%s %s.', esc_html__('Required', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

State

' . sprintf('%s %s.', esc_html__('Required', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

Postal code

' . sprintf('%s %s.', esc_html__('Required', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

Country

' . sprintf('%s %s.', esc_html__('Required', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

Latitude

' . sprintf('%s %s.', esc_html__('Recommended', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

Longitude

' . sprintf('%s %s.', esc_html__('Recommended', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

Place ID

' . wp_kses_post(__('Click here to find your Google Maps Place ID for your Local Business.
This ID will be used to display the Google Maps link from the LB widget.', 'siteseo-pro')) . '

URL

'. esc_html__('Default: homepage. Google recommends to include your business details (address, phone, website...) for your visitors too.', 'siteseo-pro') .'

' . sprintf('%s %s.', esc_html__('Recommended', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

Telephone

' . sprintf('%s %s.', esc_html__('Recommended', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

Price range

' . sprintf('%s %s.', esc_html__('Recommended', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

'.esc_html__('Cuisine served', 'siteseo-pro').'

'. esc_html__('Only to be filled if the business type is: "FoodEstablishment", "Bakery", "BarOrPub", "Brewery", "CafeOrCoffeeShop", "FastFoodRestaurant", "IceCreamShop", "Restaurant" or "Winery".', 'siteseo-pro').'

' . sprintf('%s %s.', esc_html__('Recommended', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

'.esc_html__('Accepts Reservations', 'siteseo-pro').'

'. esc_html__('Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean (True or False), an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No.', 'siteseo-pro').'

' . sprintf('%s %s.', esc_html__('Recommended', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

Opening hours

' . wp_kses_post(__('Morning and Afternoon are just time slots', 'siteseo-pro')) . '

' . esc_html__('Eg: if you\'re opened from 10:00 AM to 9:00 PM, check Morning and enter 10:00 / 21:00.', 'siteseo-pro') . '

' . esc_html__('If you are open non-stop, check Morning and enter 0:00 / 23:59.', 'siteseo-pro') . '

    '; foreach($days as $key => $day) { $is_closed = !empty($options['opening_hours'][$key]['closed']) ? $options['opening_hours'][$key]['closed'] : 0; $open_morning = !empty($options['opening_hours'][$key]['open_morning']) ? $options['opening_hours'][$key]['open_morning'] : 0; $open_afternoon = !empty($options['opening_hours'][$key]['open_afternoon']) ? $options['opening_hours'][$key]['open_afternoon'] : 0; // Get saved start and end times $open_morning_start_hour = !empty($options['opening_hours'][$key]['open_morning_start_hour']) ? $options['opening_hours'][$key]['open_morning_start_hour'] : ''; $open_morning_start_min = !empty($options['opening_hours'][$key]['open_morning_start_min']) ? $options['opening_hours'][$key]['open_morning_start_min'] : ''; $open_morning_end_hour = !empty($options['opening_hours'][$key]['open_morning_end_hour']) ? esc_attr($options['opening_hours'][$key]['open_morning_end_hour']) : ''; $open_morning_end_min = !empty($options['opening_hours'][$key]['open_morning_end_min']) ? esc_attr($options['opening_hours'][$key]['open_morning_end_min']) : ''; $open_afternoon_start_hour = !empty($options['opening_hours'][$key]['open_afternoon_start_hour']) ? esc_attr($options['opening_hours'][$key]['open_afternoon_start_hour']) : ''; $open_afternoon_start_min = !empty($options['opening_hours'][$key]['open_afternoon_start_min']) ? esc_attr($options['opening_hours'][$key]['open_afternoon_start_min']) : ''; $open_afternoon_end_hour = !empty($options['opening_hours'][$key]['open_afternoon_end_hour']) ? esc_attr($options['opening_hours'][$key]['open_afternoon_end_hour']) : ''; $open_afternoon_end_min = !empty($options['opening_hours'][$key]['open_afternoon_end_min']) ? esc_attr($options['opening_hours'][$key]['open_afternoon_end_min']) : ''; echo'
  • ' . esc_html($day) . '



  • Closed all the day?

    Open in the morning?

    :-:

    '; echo'
    Open in the afternoon?

    :-:
    '; } echo '

    ' . sprintf('%s %s.', esc_html__('Recommended', 'siteseo-pro'), esc_html__('property by Google', 'siteseo-pro')) . '

'; } static function structured_data(){ global $siteseo; if(!empty($_POST['sumbit'])){ self::save_settings(); } $options = $siteseo->pro; //load settings $toggle_state_stru_data = isset($options['toggle_state_stru_data']) ? $options['toggle_state_stru_data'] : ''; $option_set_enable_structured_data = isset($options['enable_structured_data']) ? $options['enable_structured_data'] : ''; $option_logo_url = isset($options['structured_data_image_url']) ? $options['structured_data_image_url'] : ''; $option_desciption = isset($options['org_desciption']) ? $options['org_desciption'] : ''; $option_email_id = isset($options['org_email']) ? $options['org_email'] : ''; $option_phone = isset($options['org_phone_no']) ? $options['org_phone_no'] : ''; $option_legal_name = isset($options['org_legal']) ? $options['org_legal'] : ''; $option_establish_date = isset($options['establish_date']) ? $options['establish_date'] : ''; $option_number_emp = isset($options['number_emp']) ? $options['number_emp'] : ''; $option_vat_id = isset($options['vat_id']) ? $options['vat_id'] : ''; $option_tax_id = isset($options['tax_id']) ? $options['tax_id'] : ''; $option_iso_id = isset($options['iso_code']) ? $options['iso_code'] : ''; $option_let_code = isset($options['let_code']) ? $options['let_code'] : ''; $option_duns_number = isset($options['duns_number']) ? $options['duns_number'] : ''; $option_naics_code = isset($options['naics_code']) ? $options['naics_code'] : ''; $nonce = wp_create_nonce('siteseo_pro_toggle_nonce'); echo'

'.esc_html('Structured Data Types (schema.org)','siteseo-pro').'

'; Util::render_toggle('structured', $toggle_state_stru_data, $nonce); echo'
Enable Structured Data
Upload your publisher logo

'. esc_html__('Make sure your image follow these Google guidelines', 'siteseo-pro').'

  • '. esc_html__('A logo that is representative of the organization.', 'siteseo-pro').'
  • '. esc_html__('Files must be BMP, GIF, JPEG, PNG, WebP or SVG.', 'siteseo-pro') .'
  • '. esc_html__('The image must be 112x112px, at minimum.', 'siteseo-pro') .'
  • '. esc_html__('The image URL must be crawlable and indexable.', 'siteseo-pro') .'
  • '. esc_html__('Make sure the image looks how you intend it to look on a purely white background (for example, if the logo is mostly white or gray, it may not look how you want it to look when displayed on a white background).', 'siteseo-pro') .'

'. esc_html__('Learn more', 'siteseo-pro') .'

'.esc_html__('Organization Legal Name', 'siteseo-pro').'

' . esc_html__('The official registered name of your organization.', 'siteseo-pro') . '

'.esc_html__('Organization Description', 'siteseo-pro').'

' . esc_html__('A brief description of your organization.', 'siteseo-pro') . '

'.esc_html__('Organization Email Address', 'siteseo-pro').'

' . esc_html__('The primary email address for your organization.', 'siteseo-pro') . '

'.esc_html__('Organization Phone Number', 'siteseo-pro').'

' . esc_html__('The main contact number for your organization.', 'siteseo-pro') . '

'.esc_html__('Organization Establish Date', 'siteseo-pro').'

' . esc_html__('The date when your organization was established.', 'siteseo-pro') . '

Number Of Employees

' . esc_html__('The total number of employees in your organization.', 'siteseo-pro') . '

Organization Identifiers


' . esc_html__('We would like to know more about your organization’s identifiers. This information will assist Google in providing accurate and relevant details about your organization.', 'siteseo-pro') . '

VAT ID

' . esc_html__('The VAT identification number for your organization.', 'siteseo-pro') . '

Tax ID

' . esc_html__('The tax identification number for your organization.', 'siteseo-pro') . '

ISO 6523

' . esc_html__('The ISO 6523 identification number for your organization.', 'siteseo-pro') . '

LEI Code

' . esc_html__('The LET identification number for your organization.', 'siteseo-pro') . '

DUNS

' . esc_html__('The DUNS identification number for your organization.', 'siteseo-pro') . '

NAICS

' . esc_html__('The NAICS identification number for your organization.', 'siteseo-pro') . '

'; } static function breadcrumbs(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } $options = $siteseo->pro; $advanced_option = get_option('siteseo_advanced_option_name'); $options = isset($options['breadcrumbs_enable']) ? $options : $advanced_option; $enabled = !empty($options['breadcrumbs_enable']) ? $options['breadcrumbs_enable'] : ''; $separators = ['-', '|', '/', '←', '→', '↠', '⇒', '►', '—', '•', '»', '›', '–']; $separator = !empty($options['breadcrumbs_seperator']) ? $options['breadcrumbs_seperator'] : ''; $custom_separator = !empty($options['breadcrumbs_custom_seperator']) ? $options['breadcrumbs_custom_seperator'] : ''; $hide_home = isset($options['breadcrumbs_home']) ? $options['breadcrumbs_home'] : false; $home_label = !empty($options['breadcrumb_home_label']) ? $options['breadcrumb_home_label'] : __('Home', 'siteseo-pro'); $prefix = !empty($options['breadcrumb_prefix']) ? $options['breadcrumb_prefix'] : ''; echo'

' . esc_html__('Breadcrumbs', 'siteseo-pro') . '

'.esc_html__('Breadcrumbs work as a navigation tool for users, helping them know their current location and providing quick links to their previous browsing path, which improves the user experience.', 'siteseo-pro').'

'.esc_html__('Enable Breadcrumbs', 'siteseo-pro').'
'.esc_html__('Breadcrumbs Display Methods', 'siteseo-pro').'

'.esc_html__('Gutenberg Block', 'siteseo-pro').'

'.esc_html__('Generate Block can be accessed by going to edit post using the Gutenberg Editor, the default editor of WordPress. There search for Breadcrumbs block.', 'siteseo-pro').'

'.esc_html__('Shortcode', 'siteseo-pro').'

'.esc_html__('WordPress shortcodes are shortcuts ([shortcode]) that insert features without coding. You can use these shortcodes with Classic Editor, Gutenberg, or any other editor. Copy the shortcode below and use it in the editor.', 'siteseo-pro').'

'.esc_attr('[siteseo_breadcrumbs]','siteseo-pro').'

'.esc_html__('PHP Code', 'siteseo-pro').'

'.esc_html__('You can add the breadcrumbs by directly adding PHP code. Make sure you are aware of what you are doing. Use the code below anywhere in your theme.', 'siteseo-pro').'

'.esc_html("").'
'.esc_html__('Separator', 'siteseo-pro').'
'; foreach($separators as $sep){ $checked = ($separator == $sep) ? 'checked' : ''; echo ''; } echo '
'.esc_html__('Home Settings', 'siteseo-pro').'


'.esc_html__('Prefix', 'siteseo-pro').'
'; } static function robots(){ echo '

'.esc_html__('robots.txt','siteseo-pro').'

'. esc_html__('Manage your robots.txt file here. Adjust settings according to your SEO requirements.', 'siteseo-pro') . '

'; echo ''; if(!file_exists(ABSPATH . 'robots.txt')){ echo ''; }else{ echo ''; } if(!file_exists(ABSPATH . 'robots.txt')){ echo '
'.esc_html__('Preview', 'siteseo-pro').''.esc_html__('View Robots.txt', 'siteseo-pro').'
'; return; } $robots_txt = file_exists(ABSPATH . 'robots.txt') ? file_get_contents(ABSPATH . 'robots.txt') : ''; echo ' '.esc_html__('robots.txt File', 'siteseo-pro').' '; } static function htaccess(){ global $siteseo; $home_path = get_home_path(); $htaccess_file = $home_path . '.htaccess'; if(!empty($_POST['submit'])){ self::save_settings(); } echo '

'.esc_html__('htaccess','siteseo-pro').'

'.esc_html__('Edit your .htaccess file to configure advanced settings for your site','siteseo-pro').'

'; if(!file_exists($htaccess_file) || !is_writable($htaccess_file)){ echo '

'.esc_html__('The .htaccess file does not exist or You do not have permission to edit the .htaccess file', 'siteseo-pro').'

'; return; } echo '

'.esc_html__('Be careful editing this file. If any incorrect edits are made, your site could go down. You can restore the htaccess file by replacing it with the backup copy created by SiteSEO with name .htaccess_backup.siteseo', 'siteseo-pro').'
'.esc_html__('I understand the risk and I want to edit this file','siteseo-pro').'

'; $htaccess_code = file_get_contents($htaccess_file); echo '
'.esc_html__('Edit your htaccess file','siteseo-pro').'
'; } static function redirect_monitoring(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } $options = $siteseo->pro; $enable_404 = isset($options['enable_404_log']) ? $options['enable_404_log'] : ''; $clean_logs = isset($options['clean_404_logs']) ? $options['clean_404_logs'] : ''; $set_log_limit = isset($options['log_limits']) ? $options['log_limits'] : '100'; $redirect_type = isset($options['redirect_type']) ? $options['redirect_type'] : ''; $custom_redirect_url = isset($options['custom_redirect_url']) ? $options['custom_redirect_url'] : ''; $disable_guess_redirect = isset($options['guess_redirect']) ? $options['guess_redirect'] : ''; $enable_email_notify = isset($options['email_notify']) ? $options['email_notify'] : ''; $email_id = isset($options['send_email_to']) ? $options['send_email_to'] : ''; $disable_ip_logging = isset($options['disable_ip_logging']) ? $options['disable_ip_logging'] : ''; $redirect_code = isset($options['status_code']) ? $options['status_code'] : ''; $toggle_state_redirect = !empty($options['toggle_state_redirect_monitoring']) ? $options['toggle_state_redirect_monitoring'] : ''; $nonce = wp_create_nonce('siteseo_pro_toggle_nonce'); $default_email_id = get_option('admin_email'); if(!empty($toggle_state_redirect) && !empty($enable_404)){ $logs_data = Util::get_logs(); } echo'

'.esc_html__('Redirections / 404 monitoring', 'siteseo-pro').'

'.esc_html__('Optimize Your Site with Smart Redirects & 404 Monitoring', 'siteseo-pro').'

'; Util::render_toggle('404_monitoring', $toggle_state_redirect, $nonce); echo''. ''. ''; if(!empty($enable_404)){ echo'
'.esc_html__('404 Log', 'siteseo-pro').'
'.esc_html__('404 Cleaning', 'siteseo-pro').'
'.esc_html__('Log Limits').'
'.esc_html__('Redirect 404 to','siteseo-pro').'
'.esc_html__('Redirect to specific URL ','siteseo-pro').'
'.esc_html__('Status code of redirection','siteseo-pro').'
'.esc_html__('Enable email notification', 'siteseo-pro').' '.esc_html__('1 email per week with the top 404 errors, and the latest logged (within a limit of 10)', 'siteseo-pro') . '
'.esc_html__('Send email to', 'siteseo-pro').'

'.esc_html__('If you put empty it send default admin email', 'siteseo-pro').'

'.esc_html__('Disable guess redirect url for 404','siteseo-pro').' '. esc_html__('Stop WordPress to attempt to guess a redirect URL for a 404 request', 'siteseo-pro') .'
'.esc_html__('Disable ip logging','siteseo-pro').'
'.esc_html__('Redirections logs', 'siteseo-pro').'
'; if(!empty($logs_data['items'])){ foreach($logs_data['items'] as $log){ echo''; } } echo'
'.esc_html__('URL', 'siteseo-pro').' '.esc_html__('IP Address', 'siteseo-pro').' '.esc_html__('Time', 'siteseo-pro').' '.esc_html__('User Agent', 'siteseo-pro').' '.esc_html__('Referer', 'siteseo-pro').' '.esc_html__('Hit count', 'siteseo-pro').'
'.esc_html($log->url).' '.esc_html($log->ip_address).' '.esc_html($log->timestamp).' '.esc_html($log->user_agent).' '.esc_html($log->referer).' '.esc_html($log->hit_count).'

'; } echo'

'; } static function google_news(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } $settings = $siteseo->pro; $toggle_state_google_news = !empty($settings['toggle_state_google_news']) ? $settings['toggle_state_google_news'] : ''; $nonce = wp_create_nonce('siteseo_pro_toggle_nonce'); $enable_google_news = isset($settings['google_news']) ? $settings['google_news'] : ''; $publication_name = isset($settings['publication_name']) ? $settings['publication_name'] : ''; echo'

'.esc_html__('Google News','siteseo-pro').'

'.esc_html__('Enable your google News Sitemap','siteseo-pro').'

'; util::render_toggle('google_news', $toggle_state_google_news, $nonce); echo'
' . esc_url(get_option('home')) . '/news.xml

'.wp_kses_post('If you have not enabled sitemap settings, this feature will not be useful. Click here to configure the settings.', 'siteseo-pro').'

'.esc_html__('Enable google news', 'siteseo-pro').'
'.esc_html__('Enter publication name', 'siteseo-pro').'
'.esc_html__('Select post types','siteseo-pro').' '; $post_types = siteseo_post_types(); $selected_types = isset($settings['post_types']) && is_array($settings['post_types']) ? $settings['post_types'] : []; foreach($post_types as $post){ $post_name = $post->name; $post_label = $post->label; $is_checked = in_array($post->name, $selected_types) ? 'checked' : ''; echo''; echo'

'; } echo'
'; } // save settings fun static function save_settings(){ global $siteseo; check_admin_referer('sitseo_pro_settings'); if(!current_user_can('manage_options') || !is_admin()){ return; } $options = $siteseo->pro; if(empty($_POST['siteseo_pro_options'])){ return; } // WooCommerce tab if(isset($_POST['woocommerce_settings'])){ $options['woocommerce_cart_page_no_index'] = isset($_POST['siteseo_pro_options']['woocommerce_cart_page_no_index']); $options['woocommerce_checkout_page_no_index'] = isset($_POST['siteseo_pro_options']['woocommerce_checkout_page_no_index']); $options['woocommerce_customer_account_page_no_index'] = isset($_POST['siteseo_pro_options']['woocommerce_customer_account_page_no_index']); $options['woocommerce_product_og_price'] = isset($_POST['siteseo_pro_options']['woocommerce_product_og_price']); $options['woocommerce_product_og_currency'] = isset($_POST['siteseo_pro_options']['woocommerce_product_og_currency']); $options['woocommerce_meta_generator'] = isset($_POST['siteseo_pro_options']['woocommerce_meta_generator']); $options['woocommerce_schema_output'] = isset($_POST['siteseo_pro_options']['woocommerce_schema_output']); $options['woocommerce_schema_breadcrumbs_output'] = isset($_POST['siteseo_pro_options']['woocommerce_schema_breadcrumbs_output']); } // Dublin Core settings if(isset($_POST['dublin_code_settings'])){ $options['dublin_core_enable'] = isset($_POST['siteseo_pro_options']['dublin_core_enable']); } // Easy Digital Downloads if(isset($_POST['digital_download_settings'])){ $options['edd_product_og_price'] = isset($_POST['siteseo_pro_options']['edd_product_og_price']); $options['edd_product_og_currency'] = isset($_POST['siteseo_pro_options']['edd_product_og_currency']); $options['edd_meta_generator'] = isset($_POST['siteseo_pro_options']['edd_meta_generator']); } // PageSpeed Settings if(isset($_POST['pagespeed_settings'])){ $options['ps_api_key'] = !empty($_POST['siteseo_pro_options']['ps_api_key']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['ps_api_key'])) : ''; } //local Business settings if(isset($_POST['local_business_settings'])){ $options['local_business_display_schema'] = !empty($_POST['siteseo_pro_options']['local_business_display_schema']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options'] ['local_business_display_schema'])) : ''; $options['street_address'] = !empty($_POST['siteseo_pro_options']['street_address']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['street_address'])) : ''; $options['city'] = !empty($_POST['siteseo_pro_options']['city']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['city'])) : ''; $options['state'] = !empty($_POST['siteseo_pro_options']['state']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['state'])) : ''; $options['postal_code'] = !empty($_POST['siteseo_pro_options']['postal_code']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['postal_code'])) : ''; $options['country'] = !empty($_POST['siteseo_pro_options']['country']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['country'])) : ''; $options['latitude'] = !empty($_POST['siteseo_pro_options']['latitude']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['latitude'])) : ''; $options['longitude'] = !empty($_POST['siteseo_pro_options']['longitude']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['longitude'])) : ''; $options['place_id'] = !empty($_POST['siteseo_pro_options']['place_id']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['place_id'])) : ''; $options['url'] = !empty($_POST['siteseo_pro_options']['url']) ? sanitize_url(wp_unslash($_POST['siteseo_pro_options']['url'])) : ''; $options['telephone'] = !empty($_POST['siteseo_pro_options']['telephone']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['telephone'])) : ''; $options['price_range'] = !empty($_POST['siteseo_pro_options']['price_range']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['price_range'])) : ''; $options['cuisine_served'] = !empty($_POST['siteseo_pro_options']['cuisine_served']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['cuisine_served'])) : ''; $options['accepts_reser'] = !empty($_POST['siteseo_pro_options']['accepts_reser']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['accepts_reser'])) : ''; // business type if(!empty($_POST['siteseo_pro_options']['business_type'])){ $options['business_type'] = sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['business_type'])); } // opening hours if(!empty($_POST['siteseo_pro_options']['opening_hours'])){ $opening_hours = []; foreach($_POST['siteseo_pro_options']['opening_hours'] as $day => $hours){ $opening_hours[$day] = [ 'closed' => !empty($hours['closed']), 'open_morning' => !empty($hours['open_morning']), 'open_morning_start_hour' => sanitize_text_field($hours['open_morning_start_hour']), 'open_morning_start_min' => sanitize_text_field($hours['open_morning_start_min']), 'open_morning_end_hour' => sanitize_text_field($hours['open_morning_end_hour']), 'open_morning_end_min' => sanitize_text_field($hours['open_morning_end_min']), 'open_afternoon' => !empty($hours['open_afternoon']) ? true : false, 'open_afternoon_start_hour' => sanitize_text_field($hours['open_afternoon_start_hour']), 'open_afternoon_start_min' => sanitize_text_field($hours['open_afternoon_start_min']), 'open_afternoon_end_hour' => sanitize_text_field($hours['open_afternoon_end_hour']), 'open_afternoon_end_min' => sanitize_text_field($hours['open_afternoon_end_min']) ]; } $options['opening_hours'] = $opening_hours; } } // Strutured data settings if(isset($_POST['structured_data_settings'])){ $options['enable_structured_data'] = !empty($_POST['siteseo_pro_options']['enable_structured_data']); $options['structured_data_image_url'] = !empty($_POST['siteseo_pro_options']['structured_data_image_url']) ? sanitize_url(wp_unslash($_POST['siteseo_pro_options']['structured_data_image_url'])) : ''; $options['org_desciption'] = !empty($_POST['siteseo_pro_options']['org_desciption']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['org_desciption'])) : ''; $options['org_email'] = !empty($_POST['siteseo_pro_options']['org_email']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['org_email'])) : ''; $options['org_phone_no'] = !empty($_POST['siteseo_pro_options']['org_phone_no']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['org_phone_no'])) : ''; $options['org_legal'] = !empty($_POST['siteseo_pro_options']['org_legal']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['org_legal'])) : ''; $options['establish_date'] = !empty($_POST['siteseo_pro_options']['establish_date']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['establish_date'])) : ''; $options['number_emp'] = !empty($_POST['siteseo_pro_options']['number_emp']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['number_emp'])) : ''; $options['vat_id'] = !empty($_POST['siteseo_pro_options']['vat_id']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['vat_id'])) : ''; $options['tax_id'] = !empty($_POST['siteseo_pro_options']['tax_id']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['tax_id'])) : ''; $options['iso_code'] = !empty($_POST['siteseo_pro_options']['iso_code']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['iso_code'])) : ''; $options['let_code'] = !empty($_POST['siteseo_pro_options']['let_code']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['let_code'])) : ''; $options['duns_number'] = !empty($_POST['siteseo_pro_options']['duns_number']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['duns_number'])) : ''; $options['naics_code'] = !empty($_POST['siteseo_pro_options']['naics_code']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['naics_code'])) : ''; } if(isset($_POST['breadcrumbs_tab'])){ $options['breadcrumbs_enable'] = isset($_POST['siteseo_pro_options']['breadcrumbs_enable']); $options['breadcrumbs_seperator'] = isset($_POST['siteseo_pro_options']['breadcrumbs_seperator']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['breadcrumbs_seperator'])) : ''; $options['breadcrumbs_custom_seperator'] = isset($_POST['siteseo_pro_options']['breadcrumbs_custom_seperator']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['breadcrumbs_custom_seperator'])) : ''; $options['breadcrumbs_home'] = isset($_POST['siteseo_pro_options']['breadcrumbs_home']); $options['breadcrumb_home_label'] = isset($_POST['siteseo_pro_options']['breadcrumb_home_label']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['breadcrumb_home_label'])) : ''; $options['breadcrumb_prefix'] = isset($_POST['siteseo_pro_options']['breadcrumb_prefix']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['breadcrumb_prefix'])) : ''; } if(isset($_POST['404_monitoring'])){ $options['enable_404_log'] = isset($_POST['siteseo_pro_options']['404_log']); $options['clean_404_logs'] = isset($_POST['siteseo_pro_options']['clean_404_logs']); $options['log_limits'] = isset($_POST['siteseo_pro_options']['log_limits']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['log_limits'])) : ''; $options['email_notify'] = isset($_POST['siteseo_pro_options']['email_notify']); $options['send_email_to'] = isset($_POST['siteseo_pro_options']['email_id']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['email_id'])) : ''; $options['guess_redirect'] = isset($_POST['siteseo_pro_options']['eanble_guess_redirect']); $options['custom_redirect_url'] = isset($_POST['siteseo_pro_options']['redirect_url']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['redirect_url'])) : ''; $options['redirect_type'] = isset($_POST['siteseo_pro_options']['redirect_to']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['redirect_to'])) : ''; $options['disable_ip_logging'] = isset($_POST['siteseo_pro_options']['disable_ip_logging']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['disable_ip_logging'])) : ''; $options['status_code'] = isset($_POST['siteseo_pro_options']['status_code']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['status_code'])) : ''; if(!empty($options['clean_404_logs'])){ // Enabling cron for cleanup if(!wp_next_scheduled('siteseo_404_cleanup')){ wp_schedule_event(time(), 'daily', 'siteseo_404_cleanup'); } } else { wp_clear_scheduled_hook('siteseo_404_cleanup'); } } if(isset($_POST['google_news_tab'])){ $options['google_news'] = isset($_POST['siteseo_pro_options']['google_news']); $options['publication_name'] = isset($_POST['siteseo_pro_options']['publication_name']) ? sanitize_text_field(wp_unslash($_POST['siteseo_pro_options']['publication_name'])) : ''; if(isset($_POST['siteseo_pro_options']['post_types'])){ $options['post_types'] = map_deep(wp_unslash($_POST['siteseo_pro_options']['post_types']), 'sanitize_text_field'); } else{ $options['post_types'] = []; } } $siteseo->pro = $options; // Updates the global variable update_option('siteseo_pro_options', $options); } }