| Server IP : 35.201.19.92 / Your IP : 216.73.216.212 Web Server : nginx System : Linux pod-200961 6.8.0-1055-gke #61-Ubuntu SMP Tue May 26 22:57:42 UTC 2026 x86_64 User : fpm200098 ( 200098) PHP Version : 8.2.34 Disable Function : apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,disk_free_space,disk_total_space,diskfreespace,dl,exec,fastcgi_finish_request,link,opcache_compile_file,opcache_get_configuration,opcache_invalidate,opcache_is_script_cached,opcache_reset,passthru,pclose,pcntl_exec,popen,posix_getpid,posix_getppid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,realpath_cache_get,shell_exec,show_source,symlink,system MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nas/content/live/questfamilyday/wp-content/plugins/wp-seopress-pro/inc/admin/sanitize/ |
Upload File : |
<?php
defined('ABSPATH') or exit('Please don’t call the plugin directly. Thanks :)');
function seopress_pro_sanitize_options_fields($input){
$seopress_pro_sanitize_fields = [
'seopress_404_redirect_custom_url',
'seopress_404_enable_mails_from',
'seopress_news_name',
'seopress_htaccess_file',
'seopress_google_analytics_auth_secret_id',
'seopress_google_analytics_auth_client_id',
'seopress_bot_scan_settings_timeout',
'seopress_bot_scan_settings_number',
'seopress_local_business_street_address',
'seopress_local_business_address_locality',
'seopress_local_business_address_region',
//'seopress_local_business_postal_code',
'seopress_local_business_address_country',
'seopress_local_business_lat',
'seopress_local_business_lon',
'seopress_local_business_place_id',
'seopress_local_business_url',
'seopress_local_business_phone',
'seopress_local_business_email',
'seopress_local_business_price_range',
'seopress_local_business_cuisine',
'seopress_local_business_accepts_reservations',
// 'seopress_local_business_opening_hours',
'seopress_robots_file',
'seopress_mu_robots_file',
'seopress_rss_before_html',
'seopress_rss_after_html',
'seopress_rewrite_search',
//'seopress_breadcrumbs_i18n_home',
//seopress_breadcrumbs_i18n_here,
'seopress_breadcrumbs_i18n_author',
'seopress_breadcrumbs_i18n_404',
'seopress_breadcrumbs_i18n_search',
'seopress_breadcrumbs_i18n_no_results',
'seopress_breadcrumbs_i18n_attachments',
'seopress_breadcrumbs_i18n_paged',
'seopress_white_label_admin_menu',
// 'seopress_white_label_admin_bar_icon',
'seopress_white_label_plugin_list_title',
'seopress_white_label_plugin_list_title_pro',
'seopress_white_label_plugin_list_desc',
'seopress_white_label_plugin_list_desc_pro',
'seopress_white_label_plugin_list_author',
'seopress_white_label_plugin_list_website',
'seopress_mu_white_label_admin_menu',
'seopress_mu_white_label_admin_bar_icon',
'seopress_mu_white_label_admin_bar_logo',
'seopress_mu_white_label_plugin_list_title',
'seopress_mu_white_label_plugin_list_title_pro',
'seopress_mu_white_label_plugin_list_desc',
'seopress_mu_white_label_plugin_list_desc_pro',
'seopress_mu_white_label_plugin_list_author',
'seopress_mu_white_label_plugin_list_website',
'seopress_ps_api_key',
'seopress_ps_url',
'seopress_ai_openai_api_key',
'seopress_seo_alerts_recipients',
'seopress_seo_alerts_slack_webhook_url',
'seopress_bot_scan_settings_email'
];
foreach ($seopress_pro_sanitize_fields as $key => $value) {
if (isset($input[$value])) {
if ('seopress_robots_file' == $value) {
$input[$value] = sanitize_textarea_field($input[$value]);
} elseif ('seopress_mu_robots_file' == $value && is_multisite()) {
$input[$value] = sanitize_textarea_field($input[$value]);
} elseif ('seopress_rss_after_html' == $value || 'seopress_rss_before_html' == $value) {
$args = [
'strong' => [],
'em' => [],
'br' => [],
'a' => ['href' => [], 'rel' => []],
];
$input[$value] = wp_kses($input[$value], $args);
} elseif ('seopress_ai_openai_api_key' == $value) {
$options = get_option('seopress_pro_option_name');
$old = isset($options['seopress_ai_openai_api_key']) ? $options['seopress_ai_openai_api_key'] : null;
if ('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' == $input[$value]) {
$input[$value] = $old;
} else {
$input[$value] = sanitize_textarea_field($input[$value]);
}
} elseif ('seopress_local_business_opening_hours' == $value) {
continue;
} elseif ( ! empty($input[$value])) {
$input[$value] = sanitize_text_field($input[$value]);
}
} else {
if ('seopress_local_business_opening_hours' == $value) {
$input['seopress_local_business_opening_hours'] = (isset($_POST['seopress_local_business_opening_hours'])) ? $_POST['seopress_local_business_opening_hours'] : null;
}
if ('seopress_local_business_postal_code' === $value) {
$input['seopress_local_business_postal_code'] = (isset($_POST['seopress_local_business_postal_code'])) ? sanitize_text_field($_POST['seopress_local_business_postal_code']) : null;
}
}
}
return $input;
}