Tribe__Events__Pro__Main::is_pro_ajax_view_request( $is_ajax_view_request,  $view )

Check the ajax request action looking for pro views


Parameters

$is_ajax_view_request

(Required) bool


Top ↑

Source

File: src/Tribe/Main.php

		public function is_pro_ajax_view_request( $is_ajax_view_request, $view ) {

			// if a particular view wasn't requested, or this isn't an ajax request, or there was no action param in the request, don't continue
			if ( $view == false || ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || empty( $_REQUEST['action'] ) ) {
				return $is_ajax_view_request;
			}

			switch ( $view ) {
				case 'map' :
					$is_ajax_view_request = ( $_REQUEST['action'] == Tribe__Events__Pro__Templates__Map::AJAX_HOOK );
					break;

				case 'photo' :
					$is_ajax_view_request = ( $_REQUEST['action'] == Tribe__Events__Pro__Templates__Photo::AJAX_HOOK );
					break;

				case 'week' :
					$is_ajax_view_request = ( $_REQUEST['action'] == Tribe__Events__Pro__Templates__Week::AJAX_HOOK );
					break;
			}

			return $is_ajax_view_request;

		}