Tribe__Events__Main::show_upgrade()

should we show the upgrade nags?


Return

(boolean)


Top ↑

Source

File: src/Tribe/Main.php

		public function show_upgrade() {
			$show_tab = current_user_can( 'activate_plugins' );

			/**
			 * Provides an oppotunity to override the decision to show or hide the upgrade tab
			 *
			 * Normally it will only show if the current user has the "activate_plugins" capability
			 * and there are some currently-activated premium plugins.
			 *
			 * @since 4.9.12
			 *
			 * @param bool $show_tab True or False for showing the Upgrade Tab.
			 */
			if ( ! apply_filters( 'tribe_events_show_upgrade_tab', $show_tab ) ) {
				return false;
			}

			/**
			 * This constant was introduced in the View Alpha
			 * for agencies or others who'd like to hide the V2 Views upgrade prompt.
			 * Let them set a constant in wp-config that will be respected.
			 */
			if ( defined( 'TRIBE_HIDE_V2_VIEWS_UPGRADE' ) ) {
				return false;
			}

			return true;
		}

Top ↑

Changelog

Changelog
Version Description
4.9.12 Introduced.