Add two hooks before and after venue map displayed in Venue taxonomy term page

This commit is contained in:
savvasha
2019-06-16 09:38:11 +03:00
parent 9e69d734b3
commit 6e15f341ed

View File

@@ -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' );