prefix . self::$plugin_prefix; self::$db_host = DB_HOST; self::$db_port = 3306; self::$db_socket = false; if(preg_match('/(?=:\d+$)/', DB_HOST)) { list(self::$db_host, self::$db_port) = explode(':', DB_HOST); } else { if(preg_match('/:/', DB_HOST)) { self::$db_socket = true; } } self::$db_name = DB_NAME; self::$db_username = DB_USER; self::$db_password = DB_PASSWORD; self::$db_charset = $wpdb->get_charset_collate(); self::$db_source_name = self::dbSourceName(self::$db_host, self::$db_socket, self::$db_port); self::$db_timezone_offset = self::getDbTimezoneOffset(); } static function intializePath($path) { if(!is_dir($path)) { @mkdir($path); if(!is_dir($path)) { throw new \Exception(__("The plugin requires a writeable WordPress uploads folder.")); } file_put_contents( $path . '/index.php', str_replace('\n', PHP_EOL, '