Tribe__Events__Pro__Assets::get_data_tribe_geoloc()

Gets the localize data for Geoloc on Events Calendar Pro


Return

(array)


Top ↑

Source

File: src/Tribe/Assets.php

	public function get_data_tribe_geoloc() {

		$data = array(
			'ajaxurl'  => admin_url( 'admin-ajax.php', admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ) ),
			'nonce'    => wp_create_nonce( 'tribe_geosearch' ),
			'map_view' => 'map' === tribe( 'tec.main' )->displaying,
			'pin_url'  => Tribe__Customizer::instance()->get_option( array( 'global_elements', 'map_pin' ), false ),
		);

		/**
		 * Filters the Events Calendar Pro Maps script localization
		 *
		 * @since  4.4.30  Removed the Third param
		 *
		 * @param  array   $data    JS variable
		 * @param  string  $script  Which script this localizes
		 */
		$data = apply_filters( 'tribe_events_pro_geoloc_localize_script', $data, 'tribe-events-pro-geoloc' );

		return $data;

	}

Top ↑

Changelog

Changelog
Version Description
4.4.30 Introduced.