SILENT KILLERPanel

Current Path: > home > ivftiowh > > public_html > wp-includes


Operation   : Linux premium88.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Software     : Apache
Server IP    : 185.61.154.216 | Your IP: 216.73.216.44
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/ivftiowh//public_html/wp-includes

NameTypeSizeLast ModifiedActions
ID3 Directory - -
IXR Directory - -
PHPMailer Directory - -
Requests Directory - -
SimplePie Directory - -
Text Directory - -
assets Directory - -
block-patterns Directory - -
block-supports Directory - -
blocks Directory - -
certificates Directory - -
css Directory - -
customize Directory - -
fonts Directory - -
html-api Directory - -
images Directory - -
js Directory - -
php-compat Directory - -
pomo Directory - -
rest-api Directory - -
sitemaps Directory - -
sodium_compat Directory - -
style-engine Directory - -
theme-compat Directory - -
widgets Directory - -
.htaccess File 160 bytes June 28 2024 08:27:59.
admin-bar.php File 35131 bytes September 13 2023 04:25:41.
atomlib.php File 11950 bytes September 13 2023 04:25:41.
author-template.php File 18951 bytes September 13 2023 04:25:41.
block-editor.php File 27598 bytes September 13 2023 04:25:41.
block-i18n.json File 316 bytes September 13 2023 04:25:41.
block-patterns.php File 15901 bytes September 13 2023 04:25:41.
block-template-utils.php File 49130 bytes September 13 2023 04:25:41.
block-template.php File 10592 bytes September 13 2023 04:25:42.
blocks.php File 59159 bytes June 24 2024 20:05:07.
bookmark-template.php File 12909 bytes September 13 2023 04:25:41.
bookmark.php File 15378 bytes September 13 2023 04:25:41.
cache-compat.php File 5969 bytes September 13 2023 04:25:42.
cache.php File 13474 bytes September 13 2023 04:25:42.
canonical.php File 33339 bytes September 13 2023 04:25:41.
capabilities.php File 40026 bytes September 13 2023 04:25:41.
category-template.php File 57009 bytes September 13 2023 04:25:41.
category.php File 12702 bytes September 13 2023 04:25:41.
class-IXR.php File 2543 bytes August 05 2020 08:21:22.
class-feed.php File 529 bytes August 05 2020 08:21:23.
class-http.php File 367 bytes September 13 2023 04:25:42.
class-json.php File 43684 bytes September 13 2023 04:25:42.
class-oembed.php File 401 bytes September 13 2023 04:25:41.
class-phpass.php File 6708 bytes September 13 2023 04:25:41.
class-phpmailer.php File 664 bytes September 13 2023 04:25:41.
class-pop3.php File 20969 bytes September 13 2023 04:25:41.
class-requests.php File 2237 bytes September 13 2023 04:25:41.
class-simplepie.php File 98124 bytes September 13 2023 04:25:41.
class-smtp.php File 457 bytes September 13 2023 04:25:41.
class-snoopy.php File 37715 bytes September 13 2023 04:25:42.
class-walker-category-dropdown.php File 2473 bytes September 13 2023 04:25:41.
class-walker-category.php File 8478 bytes September 13 2023 04:25:41.
class-walker-comment.php File 14214 bytes September 13 2023 04:25:41.
class-walker-nav-menu.php File 11313 bytes September 13 2023 04:25:42.
class-walker-page-dropdown.php File 2710 bytes September 13 2023 04:25:41.
class-walker-page.php File 7623 bytes September 13 2023 04:25:41.
class-wp-admin-bar-plain.php File 1000 bytes September 13 2023 04:25:41.
class-wp-admin-bar.php File 17364 bytes September 13 2023 04:25:41.
class-wp-ajax-response.php File 5266 bytes September 13 2023 04:25:41.
class-wp-application-passwords.php File 12854 bytes September 13 2023 04:25:41.
class-wp-block-editor-context.php File 1350 bytes September 13 2023 04:25:42.
class-wp-block-list.php File 4749 bytes September 13 2023 04:25:42.
class-wp-block-live.php File 1000 bytes September 13 2023 04:25:41.
class-wp-block-parser-block.php File 2555 bytes September 13 2023 04:25:42.
class-wp-block-parser-frame.php File 1916 bytes September 13 2023 04:25:41.
class-wp-block-parser.php File 11761 bytes September 13 2023 04:25:41.
class-wp-block-pattern-categories-registry.php File 5371 bytes September 13 2023 04:25:42.
class-wp-block-patterns-registry.php File 8775 bytes October 13 2023 06:16:03.
class-wp-block-styles-registry.php File 5883 bytes September 13 2023 04:25:41.
class-wp-block-supports.php File 5521 bytes September 13 2023 04:25:42.
class-wp-block-template.php File 1951 bytes September 13 2023 04:25:41.
class-wp-block-type-registry.php File 5013 bytes October 13 2023 06:16:03.
class-wp-block-type.php File 14301 bytes September 13 2023 04:25:41.
class-wp-block.php File 8402 bytes September 13 2023 04:25:42.
class-wp-classic-to-block-menu-converter.php File 4088 bytes September 13 2023 04:25:42.
class-wp-comment-query.php File 47829 bytes September 13 2023 04:25:41.
class-wp-comment.php File 9357 bytes September 13 2023 04:25:41.
class-wp-customize-control.php File 25843 bytes September 13 2023 04:25:41.
class-wp-customize-manager.php File 202163 bytes September 13 2023 04:25:41.
class-wp-customize-nav-menus.php File 57304 bytes September 13 2023 04:25:41.
class-wp-customize-panel.php File 10671 bytes September 13 2023 04:25:41.
class-wp-customize-section.php File 11245 bytes September 13 2023 04:25:42.
class-wp-customize-setting.php File 29890 bytes September 13 2023 04:25:41.
class-wp-customize-widgets.php File 71633 bytes September 13 2023 04:25:41.
class-wp-date-query.php File 35719 bytes September 13 2023 04:25:42.
class-wp-dependencies.php File 14063 bytes September 13 2023 04:25:42.
class-wp-dependency.php File 2627 bytes September 13 2023 04:25:42.
class-wp-duotone.php File 39362 bytes September 13 2023 04:25:41.
class-wp-editor.php File 72084 bytes September 13 2023 04:25:42.
class-wp-embed.php File 15994 bytes September 13 2023 04:25:42.
class-wp-error.php File 7502 bytes September 13 2023 04:25:41.
class-wp-fatal-error-handler.php File 7872 bytes September 13 2023 04:25:41.
class-wp-feed-cache-transient.php File 2586 bytes September 13 2023 04:25:41.
class-wp-feed-cache.php File 996 bytes September 13 2023 04:25:41.
class-wp-hook.php File 15628 bytes September 13 2023 04:25:41.
class-wp-http-cookie.php File 7389 bytes September 13 2023 04:25:41.
class-wp-http-curl.php File 12492 bytes September 13 2023 04:25:41.
class-wp-http-encoding.php File 6689 bytes September 13 2023 04:25:41.
class-wp-http-ixr-client.php File 3501 bytes September 13 2023 04:25:41.
class-wp-http-proxy.php File 5980 bytes September 13 2023 04:25:42.
class-wp-http-requests-hooks.php File 2022 bytes September 13 2023 04:25:41.
class-wp-http-requests-response.php File 4400 bytes September 13 2023 04:25:41.
class-wp-http-response.php File 2977 bytes September 13 2023 04:25:41.
class-wp-http-streams.php File 16810 bytes September 13 2023 04:25:42.
class-wp-http.php File 40350 bytes September 13 2023 04:25:41.
class-wp-image-editor-gd.php File 16623 bytes September 13 2023 04:25:41.
class-wp-image-editor-imagick.php File 29990 bytes September 13 2023 04:25:41.
class-wp-image-editor.php File 17133 bytes September 13 2023 04:25:42.
class-wp-list-util.php File 7443 bytes September 13 2023 04:25:41.
class-wp-locale-switcher.php File 6561 bytes September 13 2023 04:25:41.
class-wp-locale.php File 16115 bytes September 13 2023 04:25:41.
class-wp-matchesmapregex.php File 1826 bytes September 13 2023 04:25:41.
class-wp-meta-query.php File 30533 bytes September 13 2023 04:25:41.
class-wp-metadata-lazyloader.php File 6833 bytes September 13 2023 04:25:41.
class-wp-navigation-fallback.php File 6980 bytes September 13 2023 04:25:41.
class-wp-network-query.php File 19291 bytes September 13 2023 04:25:41.
class-wp-network.php File 12189 bytes September 13 2023 04:25:41.
class-wp-object-cache.php File 17594 bytes September 13 2023 04:25:42.
class-wp-oembed-controller.php File 6879 bytes September 13 2023 04:25:42.
class-wp-oembed.php File 31394 bytes September 13 2023 04:25:42.
class-wp-paused-extensions-storage.php File 5062 bytes September 13 2023 04:25:41.
class-wp-post-type.php File 25964 bytes September 13 2023 04:25:42.
class-wp-post.php File 6484 bytes September 13 2023 04:25:41.
class-wp-query.php File 150699 bytes September 13 2023 04:25:41.
class-wp-recovery-mode-cookie-service.php File 6877 bytes September 13 2023 04:25:41.
class-wp-recovery-mode-email-service.php File 11183 bytes September 13 2023 04:25:41.
class-wp-recovery-mode-key-service.php File 4501 bytes September 13 2023 04:25:41.
class-wp-recovery-mode-link-service.php File 3463 bytes September 13 2023 04:25:41.
class-wp-recovery-mode.php File 11435 bytes September 13 2023 04:25:41.
class-wp-rewrite.php File 63038 bytes September 13 2023 04:25:41.
class-wp-role.php File 2524 bytes September 13 2023 04:25:42.
class-wp-roles.php File 8578 bytes September 13 2023 04:25:41.
class-wp-scripts.php File 28351 bytes September 13 2023 04:25:41.
class-wp-session-tokens.php File 7451 bytes September 13 2023 04:25:41.
class-wp-simplepie-file.php File 3403 bytes September 13 2023 04:25:42.
class-wp-simplepie-sanitize-kses.php File 1800 bytes September 13 2023 04:25:41.
class-wp-site-query.php File 31020 bytes September 13 2023 04:25:42.
class-wp-site.php File 7454 bytes September 13 2023 04:25:41.
class-wp-styles.php File 10898 bytes September 13 2023 04:25:41.
class-wp-tax-query.php File 19545 bytes September 13 2023 04:25:42.
class-wp-taxonomy.php File 18567 bytes September 13 2023 04:25:41.
class-wp-term-query.php File 40451 bytes September 13 2023 04:25:42.
class-wp-term.php File 5298 bytes September 13 2023 04:25:41.
class-wp-text-diff-renderer-inline.php File 830 bytes September 13 2023 04:25:41.
class-wp-text-diff-renderer-table.php File 17187 bytes September 13 2023 04:25:41.
class-wp-textdomain-registry.php File 5976 bytes September 13 2023 04:25:41.
class-wp-theme-json-data.php File 1554 bytes September 13 2023 04:25:41.
class-wp-theme-json-resolver.php File 24669 bytes September 13 2023 04:25:41.
class-wp-theme-json-schema.php File 4301 bytes September 13 2023 04:25:41.
class-wp-theme-json.php File 129295 bytes October 13 2023 06:16:03.
class-wp-theme.php File 56188 bytes October 13 2023 06:16:03.
class-wp-user-meta-session-tokens.php File 2990 bytes August 05 2020 08:21:22.
class-wp-user-query.php File 42242 bytes September 13 2023 04:25:41.
class-wp-user-request.php File 2222 bytes September 13 2023 04:25:41.
class-wp-user.php File 22762 bytes September 13 2023 04:25:41.
class-wp-walker.php File 13167 bytes September 13 2023 04:25:41.
class-wp-widget-factory.php File 3347 bytes September 13 2023 04:25:42.
class-wp-widget.php File 18383 bytes September 13 2023 04:25:42.
class-wp-xmlrpc-server.php File 214130 bytes September 13 2023 04:25:41.
class-wp.php File 25978 bytes September 13 2023 04:25:41.
class-wpdb.php File 120418 bytes September 13 2023 04:25:41.
class.wp-dependencies.php File 373 bytes September 13 2023 04:25:42.
class.wp-scripts.php File 343 bytes September 13 2023 04:25:42.
class.wp-styles.php File 338 bytes September 13 2023 04:25:42.
comment-template.php File 101319 bytes September 13 2023 04:25:41.
comment.php File 128537 bytes September 13 2023 04:25:41.
compat.php File 15219 bytes September 13 2023 04:25:41.
cron.php File 41540 bytes September 13 2023 04:25:41.
date-long.php File 1000 bytes September 13 2023 04:25:41.
date.php File 400 bytes September 13 2023 04:25:41.
default-constants.php File 10981 bytes September 13 2023 04:25:41.
default-filters.php File 33016 bytes October 13 2023 06:16:03.
default-widgets.php File 2222 bytes September 13 2023 04:25:42.
deprecated.php File 159498 bytes September 13 2023 04:25:41.
embed-template.php File 338 bytes September 13 2023 04:25:41.
embed.php File 37470 bytes September 13 2023 04:25:42.
error-protection.php File 4121 bytes September 13 2023 04:25:42.
feed-atom-comments.php File 5448 bytes September 13 2023 04:25:42.
feed-atom.php File 3048 bytes September 13 2023 04:25:41.
feed-rdf.php File 2668 bytes August 05 2020 08:21:22.
feed-rss.php File 1189 bytes August 05 2020 08:21:23.
feed-rss2-comments.php File 4080 bytes September 13 2023 04:25:42.
feed-rss2.php File 3799 bytes August 05 2020 08:21:22.
feed.php File 23057 bytes September 13 2023 04:25:42.
formatting.php File 334312 bytes June 24 2024 20:05:07.
functions.php File 265650 bytes June 24 2024 20:05:07.
functions.wp-scripts.php File 14758 bytes September 13 2023 04:25:42.
functions.wp-styles.php File 8583 bytes September 13 2023 04:25:42.
general-template.php File 167726 bytes September 13 2023 04:25:42.
global-styles-and-settings.php File 18842 bytes September 13 2023 04:25:41.
http.php File 23848 bytes September 13 2023 04:25:42.
https-detection.php File 6505 bytes September 13 2023 04:25:41.
https-migration.php File 4741 bytes September 13 2023 04:25:42.
kses.php File 71670 bytes September 13 2023 04:25:41.
l10n.php File 62783 bytes September 13 2023 04:25:42.
link-template.php File 154510 bytes September 13 2023 04:25:41.
load.php File 53954 bytes September 13 2023 04:25:42.
locale.php File 162 bytes August 05 2020 08:21:22.
media-template.php File 61601 bytes September 13 2023 04:25:42.
media.php File 205173 bytes October 13 2023 06:16:03.
meta.php File 63276 bytes September 13 2023 04:25:42.
ms-blogs.php File 25628 bytes September 13 2023 04:25:42.
ms-default-constants.php File 4900 bytes September 13 2023 04:25:42.
ms-default-filters.php File 6636 bytes September 13 2023 04:25:41.
ms-deprecated.php File 21758 bytes September 13 2023 04:25:41.
ms-files.php File 2652 bytes September 13 2023 04:25:41.
ms-functions.php File 91258 bytes September 13 2023 04:25:42.
ms-load.php File 19870 bytes September 13 2023 04:25:41.
ms-network.php File 3782 bytes September 13 2023 04:25:41.
ms-settings.php File 4124 bytes September 13 2023 04:25:42.
ms-site.php File 40476 bytes September 13 2023 04:25:41.
nav-menu-template.php File 25785 bytes September 13 2023 04:25:42.
nav-menu.php File 44078 bytes September 13 2023 04:25:41.
navigation-fallback.php File 2298 bytes September 13 2023 04:25:41.
option.php File 80051 bytes September 13 2023 04:25:42.
pluggable-deprecated.php File 6263 bytes August 05 2020 08:21:22.
pluggable.php File 111475 bytes September 13 2023 04:25:41.
plugin.php File 35465 bytes September 13 2023 04:25:41.
post-formats.php File 7100 bytes September 13 2023 04:25:41.
post-template.php File 66904 bytes September 13 2023 04:25:41.
post-thumbnail-template.php File 10308 bytes September 13 2023 04:25:42.
post.php File 274389 bytes October 13 2023 06:16:03.
query.php File 37032 bytes September 13 2023 04:25:41.
registration-functions.php File 200 bytes September 13 2023 04:25:41.
registration.php File 200 bytes September 13 2023 04:25:41.
rest-api.php File 97068 bytes October 13 2023 06:16:03.
revision.php File 25433 bytes September 13 2023 04:25:41.
rewrite.php File 19514 bytes September 13 2023 04:25:41.
robots-template.php File 5185 bytes September 13 2023 04:25:41.
rss-functions.php File 255 bytes September 13 2023 04:25:41.
rss.php File 23015 bytes September 13 2023 04:25:41.
script-loader.php File 137080 bytes September 13 2023 04:25:41.
session.php File 258 bytes August 05 2020 08:21:23.
shortcodes.php File 23854 bytes October 13 2023 06:16:03.
sitemaps.php File 3238 bytes September 13 2023 04:25:42.
spl-autoload-compat.php File 441 bytes September 13 2023 04:25:41.
style-engine.php File 7198 bytes September 13 2023 04:25:42.
taxonomy.php File 172884 bytes September 13 2023 04:25:41.
template-canvas.php File 592 bytes September 13 2023 04:25:42.
template-loader.php File 3012 bytes September 13 2023 04:25:41.
template.php File 23327 bytes September 13 2023 04:25:41.
theme-i18n.json File 1151 bytes September 13 2023 04:25:41.
theme-previews.php File 2826 bytes October 13 2023 06:16:03.
theme-templates.php File 5522 bytes September 13 2023 04:25:42.
theme.json File 7203 bytes September 13 2023 04:25:42.
theme.php File 130874 bytes September 13 2023 04:25:42.
update.php File 36755 bytes September 13 2023 04:25:41.
user.php File 170915 bytes September 13 2023 04:25:41.
vars.php File 5838 bytes September 13 2023 04:25:42.
version.php File 928 bytes June 24 2024 20:05:07.
widgets.php File 69875 bytes September 13 2023 04:25:42.
wp-db.php File 445 bytes September 13 2023 04:25:41.
wp-diff.php File 647 bytes August 05 2020 08:21:23.

Reading File: /home/ivftiowh//public_html/wp-includes/ms-load.php

<?php
/**
 * These functions are needed to load Multisite.
 *
 * @since 3.0.0
 *
 * @package WordPress
 * @subpackage Multisite
 */

/**
 * Whether a subdomain configuration is enabled.
 *
 * @since 3.0.0
 *
 * @return bool True if subdomain configuration is enabled, false otherwise.
 */
function is_subdomain_install() {
	if ( defined( 'SUBDOMAIN_INSTALL' ) ) {
		return SUBDOMAIN_INSTALL;
	}

	return ( defined( 'VHOST' ) && 'yes' === VHOST );
}

/**
 * Returns array of network plugin files to be included in global scope.
 *
 * The default directory is wp-content/plugins. To change the default directory
 * manually, define `WP_PLUGIN_DIR` and `WP_PLUGIN_URL` in `wp-config.php`.
 *
 * @access private
 * @since 3.1.0
 *
 * @return string[] Array of absolute paths to files to include.
 */
function wp_get_active_network_plugins() {
	$active_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
	if ( empty( $active_plugins ) ) {
		return array();
	}

	$plugins        = array();
	$active_plugins = array_keys( $active_plugins );
	sort( $active_plugins );

	foreach ( $active_plugins as $plugin ) {
		if ( ! validate_file( $plugin )                     // $plugin must validate as file.
			&& str_ends_with( $plugin, '.php' )             // $plugin must end with '.php'.
			&& file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist.
			) {
			$plugins[] = WP_PLUGIN_DIR . '/' . $plugin;
		}
	}

	return $plugins;
}

/**
 * Checks status of current blog.
 *
 * Checks if the blog is deleted, inactive, archived, or spammed.
 *
 * Dies with a default message if the blog does not pass the check.
 *
 * To change the default message when a blog does not pass the check,
 * use the wp-content/blog-deleted.php, blog-inactive.php and
 * blog-suspended.php drop-ins.
 *
 * @since 3.0.0
 *
 * @return true|string Returns true on success, or drop-in file to include.
 */
function ms_site_check() {

	/**
	 * Filters checking the status of the current blog.
	 *
	 * @since 3.0.0
	 *
	 * @param bool|null $check Whether to skip the blog status check. Default null.
	 */
	$check = apply_filters( 'ms_site_check', null );
	if ( null !== $check ) {
		return true;
	}

	// Allow super admins to see blocked sites.
	if ( is_super_admin() ) {
		return true;
	}

	$blog = get_site();

	if ( '1' == $blog->deleted ) {
		if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) {
			return WP_CONTENT_DIR . '/blog-deleted.php';
		} else {
			wp_die( __( 'This site is no longer available.' ), '', array( 'response' => 410 ) );
		}
	}

	if ( '2' == $blog->deleted ) {
		if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) {
			return WP_CONTENT_DIR . '/blog-inactive.php';
		} else {
			$admin_email = str_replace( '@', ' AT ', get_site_option( 'admin_email', 'support@' . get_network()->domain ) );
			wp_die(
				sprintf(
					/* translators: %s: Admin email link. */
					__( 'This site has not been activated yet. If you are having problems activating your site, please contact %s.' ),
					sprintf( '<a href="mailto:%1$s">%1$s</a>', $admin_email )
				)
			);
		}
	}

	if ( '1' == $blog->archived || '1' == $blog->spam ) {
		if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) {
			return WP_CONTENT_DIR . '/blog-suspended.php';
		} else {
			wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) );
		}
	}

	return true;
}

/**
 * Retrieves the closest matching network for a domain and path.
 *
 * @since 3.9.0
 *
 * @internal In 4.4.0, converted to a wrapper for WP_Network::get_by_path()
 *
 * @param string   $domain   Domain to check.
 * @param string   $path     Path to check.
 * @param int|null $segments Path segments to use. Defaults to null, or the full path.
 * @return WP_Network|false Network object if successful. False when no network is found.
 */
function get_network_by_path( $domain, $path, $segments = null ) {
	return WP_Network::get_by_path( $domain, $path, $segments );
}

/**
 * Retrieves the closest matching site object by its domain and path.
 *
 * This will not necessarily return an exact match for a domain and path. Instead, it
 * breaks the domain and path into pieces that are then used to match the closest
 * possibility from a query.
 *
 * The intent of this method is to match a site object during bootstrap for a
 * requested site address
 *
 * @since 3.9.0
 * @since 4.7.0 Updated to always return a `WP_Site` object.
 *
 * @param string   $domain   Domain to check.
 * @param string   $path     Path to check.
 * @param int|null $segments Path segments to use. Defaults to null, or the full path.
 * @return WP_Site|false Site object if successful. False when no site is found.
 */
function get_site_by_path( $domain, $path, $segments = null ) {
	$path_segments = array_filter( explode( '/', trim( $path, '/' ) ) );

	/**
	 * Filters the number of path segments to consider when searching for a site.
	 *
	 * @since 3.9.0
	 *
	 * @param int|null $segments The number of path segments to consider. WordPress by default looks at
	 *                           one path segment following the network path. The function default of
	 *                           null only makes sense when you know the requested path should match a site.
	 * @param string   $domain   The requested domain.
	 * @param string   $path     The requested path, in full.
	 */
	$segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path );

	if ( null !== $segments && count( $path_segments ) > $segments ) {
		$path_segments = array_slice( $path_segments, 0, $segments );
	}

	$paths = array();

	while ( count( $path_segments ) ) {
		$paths[] = '/' . implode( '/', $path_segments ) . '/';
		array_pop( $path_segments );
	}

	$paths[] = '/';

	/**
	 * Determines a site by its domain and path.
	 *
	 * This allows one to short-circuit the default logic, perhaps by
	 * replacing it with a routine that is more optimal for your setup.
	 *
	 * Return null to avoid the short-circuit. Return false if no site
	 * can be found at the requested domain and path. Otherwise, return
	 * a site object.
	 *
	 * @since 3.9.0
	 *
	 * @param null|false|WP_Site $site     Site value to return by path. Default null
	 *                                     to continue retrieving the site.
	 * @param string             $domain   The requested domain.
	 * @param string             $path     The requested path, in full.
	 * @param int|null           $segments The suggested number of paths to consult.
	 *                                     Default null, meaning the entire path was to be consulted.
	 * @param string[]           $paths    The paths to search for, based on $path and $segments.
	 */
	$pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths );
	if ( null !== $pre ) {
		if ( false !== $pre && ! $pre instanceof WP_Site ) {
			$pre = new WP_Site( $pre );
		}
		return $pre;
	}

	/*
	 * @todo
	 * Caching, etc. Consider alternative optimization routes,
	 * perhaps as an opt-in for plugins, rather than using the pre_* filter.
	 * For example: The segments filter can expand or ignore paths.
	 * If persistent caching is enabled, we could query the DB for a path <> '/'
	 * then cache whether we can just always ignore paths.
	 */

	/*
	 * Either www or non-www is supported, not both. If a www domain is requested,
	 * query for both to provide the proper redirect.
	 */
	$domains = array( $domain );
	if ( str_starts_with( $domain, 'www.' ) ) {
		$domains[] = substr( $domain, 4 );
	}

	$args = array(
		'number'                 => 1,
		'update_site_meta_cache' => false,
	);

	if ( count( $domains ) > 1 ) {
		$args['domain__in']               = $domains;
		$args['orderby']['domain_length'] = 'DESC';
	} else {
		$args['domain'] = array_shift( $domains );
	}

	if ( count( $paths ) > 1 ) {
		$args['path__in']               = $paths;
		$args['orderby']['path_length'] = 'DESC';
	} else {
		$args['path'] = array_shift( $paths );
	}

	$result = get_sites( $args );
	$site   = array_shift( $result );

	if ( $site ) {
		return $site;
	}

	return false;
}

/**
 * Identifies the network and site of a requested domain and path and populates the
 * corresponding network and site global objects as part of the multisite bootstrap process.
 *
 * Prior to 4.6.0, this was a procedural block in `ms-settings.php`. It was wrapped into
 * a function to facilitate unit tests. It should not be used outside of core.
 *
 * Usually, it's easier to query the site first, which then declares its network.
 * In limited situations, we either can or must find the network first.
 *
 * If a network and site are found, a `true` response will be returned so that the
 * request can continue.
 *
 * If neither a network or site is found, `false` or a URL string will be returned
 * so that either an error can be shown or a redirect can occur.
 *
 * @since 4.6.0
 * @access private
 *
 * @global WP_Network $current_site The current network.
 * @global WP_Site    $current_blog The current site.
 *
 * @param string $domain    The requested domain.
 * @param string $path      The requested path.
 * @param bool   $subdomain Optional. Whether a subdomain (true) or subdirectory (false) configuration.
 *                          Default false.
 * @return bool|string True if bootstrap successfully populated `$current_blog` and `$current_site`.
 *                     False if bootstrap could not be properly completed.
 *                     Redirect URL if parts exist, but the request as a whole can not be fulfilled.
 */
function ms_load_current_site_and_network( $domain, $path, $subdomain = false ) {
	global $current_site, $current_blog;

	// If the network is defined in wp-config.php, we can simply use that.
	if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) {
		$current_site         = new stdClass();
		$current_site->id     = defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 1;
		$current_site->domain = DOMAIN_CURRENT_SITE;
		$current_site->path   = PATH_CURRENT_SITE;
		if ( defined( 'BLOG_ID_CURRENT_SITE' ) ) {
			$current_site->blog_id = BLOG_ID_CURRENT_SITE;
		} elseif ( defined( 'BLOGID_CURRENT_SITE' ) ) { // Deprecated.
			$current_site->blog_id = BLOGID_CURRENT_SITE;
		}

		if ( 0 === strcasecmp( $current_site->domain, $domain ) && 0 === strcasecmp( $current_site->path, $path ) ) {
			$current_blog = get_site_by_path( $domain, $path );
		} elseif ( '/' !== $current_site->path && 0 === strcasecmp( $current_site->domain, $domain ) && 0 === stripos( $path, $current_site->path ) ) {
			/*
			 * If the current network has a path and also matches the domain and path of the request,
			 * we need to look for a site using the first path segment following the network's path.
			 */
			$current_blog = get_site_by_path( $domain, $path, 1 + count( explode( '/', trim( $current_site->path, '/' ) ) ) );
		} else {
			// Otherwise, use the first path segment (as usual).
			$current_blog = get_site_by_path( $domain, $path, 1 );
		}
	} elseif ( ! $subdomain ) {
		/*
		 * A "subdomain" installation can be re-interpreted to mean "can support any domain".
		 * If we're not dealing with one of these installations, then the important part is determining
		 * the network first, because we need the network's path to identify any sites.
		 */
		$current_site = wp_cache_get( 'current_network', 'site-options' );
		if ( ! $current_site ) {
			// Are there even two networks installed?
			$networks = get_networks( array( 'number' => 2 ) );
			if ( count( $networks ) === 1 ) {
				$current_site = array_shift( $networks );
				wp_cache_add( 'current_network', $current_site, 'site-options' );
			} elseif ( empty( $networks ) ) {
				// A network not found hook should fire here.
				return false;
			}
		}

		if ( empty( $current_site ) ) {
			$current_site = WP_Network::get_by_path( $domain, $path, 1 );
		}

		if ( empty( $current_site ) ) {
			/**
			 * Fires when a network cannot be found based on the requested domain and path.
			 *
			 * At the time of this action, the only recourse is to redirect somewhere
			 * and exit. If you want to declare a particular network, do so earlier.
			 *
			 * @since 4.4.0
			 *
			 * @param string $domain       The domain used to search for a network.
			 * @param string $path         The path used to search for a path.
			 */
			do_action( 'ms_network_not_found', $domain, $path );

			return false;
		} elseif ( $path === $current_site->path ) {
			$current_blog = get_site_by_path( $domain, $path );
		} else {
			// Search the network path + one more path segment (on top of the network path).
			$current_blog = get_site_by_path( $domain, $path, substr_count( $current_site->path, '/' ) );
		}
	} else {
		// Find the site by the domain and at most the first path segment.
		$current_blog = get_site_by_path( $domain, $path, 1 );
		if ( $current_blog ) {
			$current_site = WP_Network::get_instance( $current_blog->site_id ? $current_blog->site_id : 1 );
		} else {
			// If you don't have a site with the same domain/path as a network, you're pretty screwed, but:
			$current_site = WP_Network::get_by_path( $domain, $path, 1 );
		}
	}

	// The network declared by the site trumps any constants.
	if ( $current_blog && $current_blog->site_id != $current_site->id ) {
		$current_site = WP_Network::get_instance( $current_blog->site_id );
	}

	// No network has been found, bail.
	if ( empty( $current_site ) ) {
		/** This action is documented in wp-includes/ms-settings.php */
		do_action( 'ms_network_not_found', $domain, $path );

		return false;
	}

	// During activation of a new subdomain, the requested site does not yet exist.
	if ( empty( $current_blog ) && wp_installing() ) {
		$current_blog          = new stdClass();
		$current_blog->blog_id = 1;
		$blog_id               = 1;
		$current_blog->public  = 1;
	}

	// No site has been found, bail.
	if ( empty( $current_blog ) ) {
		// We're going to redirect to the network URL, with some possible modifications.
		$scheme      = is_ssl() ? 'https' : 'http';
		$destination = "$scheme://{$current_site->domain}{$current_site->path}";

		/**
		 * Fires when a network can be determined but a site cannot.
		 *
		 * At the time of this action, the only recourse is to redirect somewhere
		 * and exit. If you want to declare a particular site, do so earlier.
		 *
		 * @since 3.9.0
		 *
		 * @param WP_Network $current_site The network that had been determined.
		 * @param string     $domain       The domain used to search for a site.
		 * @param string     $path         The path used to search for a site.
		 */
		do_action( 'ms_site_not_found', $current_site, $domain, $path );

		if ( $subdomain && ! defined( 'NOBLOGREDIRECT' ) ) {
			// For a "subdomain" installation, redirect to the signup form specifically.
			$destination .= 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain );
		} elseif ( $subdomain ) {
			/*
			 * For a "subdomain" installation, the NOBLOGREDIRECT constant
			 * can be used to avoid a redirect to the signup form.
			 * Using the ms_site_not_found action is preferred to the constant.
			 */
			if ( '%siteurl%' !== NOBLOGREDIRECT ) {
				$destination = NOBLOGREDIRECT;
			}
		} elseif ( 0 === strcasecmp( $current_site->domain, $domain ) ) {
			/*
			 * If the domain we were searching for matches the network's domain,
			 * it's no use redirecting back to ourselves -- it'll cause a loop.
			 * As we couldn't find a site, we're simply not installed.
			 */
			return false;
		}

		return $destination;
	}

	// Figure out the current network's main site.
	if ( empty( $current_site->blog_id ) ) {
		$current_site->blog_id = get_main_site_id( $current_site->id );
	}

	return true;
}

/**
 * Displays a failure message.
 *
 * Used when a blog's tables do not exist. Checks for a missing $wpdb->site table as well.
 *
 * @access private
 * @since 3.0.0
 * @since 4.4.0 The `$domain` and `$path` parameters were added.
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $domain The requested domain for the error to reference.
 * @param string $path   The requested path for the error to reference.
 */
function ms_not_installed( $domain, $path ) {
	global $wpdb;

	if ( ! is_admin() ) {
		dead_db();
	}

	wp_load_translations_early();

	$title = __( 'Error establishing a database connection' );

	$msg   = '<h1>' . $title . '</h1>';
	$msg  .= '<p>' . __( 'If your site does not display, please contact the owner of this network.' ) . '';
	$msg  .= ' ' . __( 'If you are the owner of this network please check that your host&#8217;s database server is running properly and all tables are error free.' ) . '</p>';
	$query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $wpdb->site ) );
	if ( ! $wpdb->get_var( $query ) ) {
		$msg .= '<p>' . sprintf(
			/* translators: %s: Table name. */
			__( '<strong>Database tables are missing.</strong> This means that your host&#8217;s database server is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.' ),
			'<code>' . $wpdb->site . '</code>'
		) . '</p>';
	} else {
		$msg .= '<p>' . sprintf(
			/* translators: 1: Site URL, 2: Table name, 3: Database name. */
			__( '<strong>Could not find site %1$s.</strong> Searched for table %2$s in database %3$s. Is that right?' ),
			'<code>' . rtrim( $domain . $path, '/' ) . '</code>',
			'<code>' . $wpdb->blogs . '</code>',
			'<code>' . DB_NAME . '</code>'
		) . '</p>';
	}
	$msg .= '<p><strong>' . __( 'What do I do now?' ) . '</strong> ';
	$msg .= sprintf(
		/* translators: %s: Documentation URL. */
		__( 'Read the <a href="%s" target="_blank">Debugging a WordPress Network</a> article. Some of the suggestions there may help you figure out what went wrong.' ),
		__( 'https://wordpress.org/documentation/article/debugging-a-wordpress-network/' )
	);
	$msg .= ' ' . __( 'If you are still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>';
	foreach ( $wpdb->tables( 'global' ) as $t => $table ) {
		if ( 'sitecategories' === $t ) {
			continue;
		}
		$msg .= '<li>' . $table . '</li>';
	}
	$msg .= '</ul>';

	wp_die( $msg, $title, array( 'response' => 500 ) );
}

/**
 * This deprecated function formerly set the site_name property of the $current_site object.
 *
 * This function simply returns the object, as before.
 * The bootstrap takes care of setting site_name.
 *
 * @access private
 * @since 3.0.0
 * @deprecated 3.9.0 Use get_current_site() instead.
 *
 * @param WP_Network $current_site
 * @return WP_Network
 */
function get_current_site_name( $current_site ) {
	_deprecated_function( __FUNCTION__, '3.9.0', 'get_current_site()' );
	return $current_site;
}

/**
 * This deprecated function managed much of the site and network loading in multisite.
 *
 * The current bootstrap code is now responsible for parsing the site and network load as
 * well as setting the global $current_site object.
 *
 * @access private
 * @since 3.0.0
 * @deprecated 3.9.0
 *
 * @global WP_Network $current_site
 *
 * @return WP_Network
 */
function wpmu_current_site() {
	global $current_site;
	_deprecated_function( __FUNCTION__, '3.9.0' );
	return $current_site;
}

/**
 * Retrieves an object containing information about the requested network.
 *
 * @since 3.9.0
 * @deprecated 4.7.0 Use get_network()
 * @see get_network()
 *
 * @internal In 4.6.0, converted to use get_network()
 *
 * @param object|int $network The network's database row or ID.
 * @return WP_Network|false Object containing network information if found, false if not.
 */
function wp_get_network( $network ) {
	_deprecated_function( __FUNCTION__, '4.7.0', 'get_network()' );

	$network = get_network( $network );
	if ( null === $network ) {
		return false;
	}

	return $network;
}

SILENT KILLER Tool