Tribe__Settings::should_setup_network_pages()

Determines whether or not the network admin pages should be initialized.

Contents

When running in parallel with TEC 3.12.4, TEC should be relied on to handle the admin screens that version of TEC (and lower) is tribe-common ignorant. Therefore, tribe-common has to be the smarter, more lenient codebase. Beyond this at least one of the two "root" plugins (The Events Calendar and Event Tickets) should be network activated to add the page.


Return

(boolean)


Top ↑

Source

File: src/Tribe/Settings.php

		public function should_setup_network_pages() {
			$root_plugin_is_mu_activated = array_sum( array_map( 'is_plugin_active_for_network', $this->root_plugins ) ) >= 1;

			if ( ! $root_plugin_is_mu_activated ) {
				return false;
			}

			if ( ! class_exists( 'Tribe__Events__Main' ) ) {
				return true;
			}

			if ( version_compare( Tribe__Events__Main::VERSION, '4.0beta', '>=' ) ) {
				return true;
			}

			return false;

		}