public function page_my_networks() {
		global $wpdb;
		?>

		<div class="wrap">
			<h1><?php esc_html_e( 'My Networks', 'wp-multi-network' ); ?></h1>

			<?php

			$my_networks = user_has_networks();
			foreach ( $my_networks as $key => $network_id ) {
				// phpcs:ignore WordPress.VIP.DirectDatabaseQuery.DirectQuery,WordPress.VIP.DirectDatabaseQuery.NoCaching
				$my_networks[ $key ] = $wpdb->get_row(
					$wpdb->prepare(
						'SELECT s.*, sm.meta_value as site_name, b.blog_id FROM ' . $wpdb->site . ' s LEFT JOIN ' . $wpdb->sitemeta . ' as sm ON sm.site_id = s.id AND sm.meta_key = %s LEFT JOIN ' . $wpdb->blogs . ' b ON s.id = b.site_id AND b.path = s.path WHERE s.id = %d',
						'site_name',
						$network_id
					)
				);
			}

			?>
			<table class="widefat fixed">
				<?php
				$num  = count( $my_networks );
				$cols = 1;
				if ( $num >= 20 ) {
					$cols = 4;
				} elseif ( $num >= 10 ) {
					$cols = 2;
				}
				$num_rows = ceil( $num / $cols );
				$split    = 0;
				for ( $i = 1; $i <= $num_rows; $i++ ) {
					$rows[] = array_slice( $my_networks, $split, $cols );
					$split  = $split + $cols;
				}

				$c = '';
				foreach ( $rows as $row ) {
					$c = ( 'alternate' === $c ) ? '' : 'alternate';
					echo "<tr class='" . esc_attr( $c ) . "'>";
					$i = 0;
					foreach ( $row as $network ) {
						$s = ( 3 === $i ) ? '' : 'border-right: 1px solid #ccc;';
						switch_to_network( $network->id );
						?>

						<td valign='top' style='<?php echo esc_attr( $s ); ?>'>
							<h3><?php echo esc_html( $network->site_name ); ?></h3>
							<p>
								<?php
								$network_actions = array(
									"<a href='" . network_home_url() . "'>" . esc_html__( 'Visit', 'wp-multi-network' ) . '</a>',
									"<a href='" . network_admin_url() . "'>" . esc_html__( 'Dashboard', 'wp-multi-network' ) . '</a>',
								);
								$network_actions = implode( ' | ', $network_actions );

								/**
								 * Filters the action links printed on the My Networks page.
								 *
								 * @since 2.0.0
								 *
								 * @param string     $network_actions Network action links, separated by pipe ( | ) characters.
								 * @param WP_Network $network         Current network object.
								 */
								echo apply_filters( 'mynetworks_network_actions', $network_actions, $network ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
								?>
							</p>
						</td>

						<?php
						restore_current_network();
						$i++;
					}
					echo '</tr>';
				}
				?>
			</table>
		</div>

		<?php
	}