public function route_pages() {

		// Bail if lacking capabilities.
		if ( ! current_user_can( 'manage_networks' ) ) {
			wp_die( esc_html__( 'You do not have permission to access this page.', 'wp-multi-network' ) );
		}

		$action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
		$action = sanitize_key( $action );

		switch ( $action ) {

			// Move a site.
			case 'move':
				$this->page_move_site();
				break;

			// Delete a network.
			case 'delete_network':
				$this->page_delete_network();
				break;

			// Edit a network.
			case 'edit_network':
				$this->page_edit_network();
				break;

			// View the list of networks, with bulk action handling.
			case 'all_networks':
				$doaction = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );
				if ( empty( $doaction ) || '-1' === $doaction ) {
					$doaction = filter_input( INPUT_POST, 'action2', FILTER_SANITIZE_STRING );
				}
				$doaction = sanitize_key( $doaction );

				switch ( $doaction ) {
					case 'delete':
						$this->page_delete_networks();
						break;
					default:
						$this->page_all_networks();
						break;
				}
				break;

			// View the list of networks.
			default:
				$this->page_all_networks();
				break;
		}
	}