Add two hooks before and after venue map displayed in Venue taxonomy term page
This commit is contained in:
@@ -12,6 +12,9 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||||||
if ( ! isset( $meta ) )
|
if ( ! isset( $meta ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ( is_tax( 'sp_venue' ) )
|
||||||
|
do_action ( 'sportspress_before_venue_map' );
|
||||||
|
|
||||||
$address = sp_array_value( $meta, 'sp_address', null );
|
$address = sp_array_value( $meta, 'sp_address', null );
|
||||||
$address = urlencode( $address );
|
$address = urlencode( $address );
|
||||||
$latitude = sp_array_value( $meta, 'sp_latitude', null );
|
$latitude = sp_array_value( $meta, 'sp_latitude', null );
|
||||||
@@ -26,3 +29,5 @@ if ( 'satellite' !== $maptype ) $maptype = 'roadmap';
|
|||||||
if ( $latitude != null && $longitude != null ){
|
if ( $latitude != null && $longitude != null ){
|
||||||
do_action ( 'sp_venue_show_map', $latitude, $longitude, $address, $zoom, $maptype );
|
do_action ( 'sp_venue_show_map', $latitude, $longitude, $address, $zoom, $maptype );
|
||||||
}
|
}
|
||||||
|
if ( is_tax( 'sp_venue' ) )
|
||||||
|
do_action ( 'sportspress_after_venue_map' );
|
||||||
Reference in New Issue
Block a user