From 6e15f341edcaee00c414ca3acb58012983dbe098 Mon Sep 17 00:00:00 2001 From: savvasha Date: Sun, 16 Jun 2019 09:38:11 +0300 Subject: [PATCH] Add two hooks before and after venue map displayed in Venue taxonomy term page --- templates/venue-map.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/venue-map.php b/templates/venue-map.php index 25c9c82d..73d16bba 100644 --- a/templates/venue-map.php +++ b/templates/venue-map.php @@ -12,6 +12,9 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly if ( ! isset( $meta ) ) return; +if ( is_tax( 'sp_venue' ) ) + do_action ( 'sportspress_before_venue_map' ); + $address = sp_array_value( $meta, 'sp_address', null ); $address = urlencode( $address ); $latitude = sp_array_value( $meta, 'sp_latitude', null ); @@ -26,3 +29,5 @@ if ( 'satellite' !== $maptype ) $maptype = 'roadmap'; if ( $latitude != null && $longitude != null ){ do_action ( 'sp_venue_show_map', $latitude, $longitude, $address, $zoom, $maptype ); } +if ( is_tax( 'sp_venue' ) ) + do_action ( 'sportspress_after_venue_map' ); \ No newline at end of file