$settings Settings. * @param bool $production Whether this is a production install. */ public static function prints_elsewhere( array $settings, bool $production ): bool { return ! $production && 'print' === ( $settings['non_production'] ?? '' ) && self::domain_mismatch(); } /** * Path prefix for subdirectory multisite installs ("/blog2"), or ''. * Stand matches paths from the domain root, so Behavior rules and page * patterns for a subsite need this prefix. */ public static function path_prefix(): string { $path = wp_parse_url( home_url( '/' ), PHP_URL_PATH ); $path = is_string( $path ) ? untrailingslashit( $path ) : ''; return '/' === $path ? '' : $path; } /** * Whether this is a subsite of a subdirectory multisite network. */ public static function is_subdirectory_subsite(): bool { return is_multisite() && ! is_subdomain_install() && '' !== self::path_prefix(); } }