<?php
///////////////////////////////////////////////////////////////////////////////////////////////////////
// BotBanish 7.0.10
// Randem Systems: https://randemsystems.support
// BotBanish define updates for WORDPRESS
// Date: 12/14/2025
// Usage:
//
// Function:
///////////////////////////////////////////////////////////////////////////////////////////////////////

function BotBanishSettingsCreateWordPress(&$BotBanishSettings) {

	global $wpdb, $BotBanishSettings;
	
	$user_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
	$user_host = (empty($user_host) && isset($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $user_host;
	$user_host = trim(str_ireplace('\\', '/', $user_host), '/');
	
	$config = array(
		'BOTBANISH_DIR' => BOTBANISH_DIR,
		'BOTBANISH_SYSTEM' => 'WORDPRESS',
		'BOTBANISH_TIMEZONE' => 'Pacific/Honolulu',
		'BOTBANISH_TABLE_PREFIX' => '',
		'BOTBANISH_DB_NAME' => $wpdb->dbname,
		'BOTBANISH_DB_USERNAME' => $wpdb->dbuser,
		'BOTBANISH_DB_PASSWORD' => $wpdb->dbpassword,
		'BOTBANISH_DB_SERVERNAME' => $wpdb->dbhost,
		'BOTBANISH_HOST' => $wpdb->dbhost,
		'BOTBANISH_DB_PORT' => '',
		'BOTBANISH_UPDATE_HTML_ACTIVE' => 0,
		'BOTBANISH_SYSTEM' => 'WORDPRESS',
		'BOTBANISH_USER_HOST' => $user_host,
		'BOTBANISH_SMTP_SERVER' => '',
		'BOTBANISH_SMTP_PORT' => '',
		'BOTBANISH_SMTP_USERNAME' => '',
		'BOTBANISH_SMTP_PASSWORD' => '',
		'BOTBANISH_WEBMASTER_EMAIL' => get_bloginfo('admin_email'),
		'BOTBANISH_DATABASE_TABLE_CHARSET_DEFAULT' => $BotBanishSettings['BOTBANISH_DATABASE_TABLE_CHARSET_DEFAULT'],
		'BOTBANISH_DATABASE_TABLE_COLLATION_DEFAULT' => $BotBanishSettings['BOTBANISH_DATABASE_TABLE_COLLATION_DEFAULT'],
	);

	foreach ($config as $key => $value)
		BotBanishDefineGlobals($key, $value);
		
	return BotBanishSetupSettings($BotBanishSettings, 'WordPress');
}
?>