Fix permissions, add post filters
This commit is contained in:
@@ -57,8 +57,9 @@ add_action( 'sp_venue_edit_form_fields', 'sportspress_venue_edit_form_fields', 1
|
||||
|
||||
// Get latitude and longitude from the last added venue
|
||||
$terms = get_terms( 'sp_venue', $args );
|
||||
if ( $terms && array_key_exists( 0, $terms) && is_object( $terms[0] ) ):
|
||||
$t_id = $terms[0]->term_id;
|
||||
if ( $terms && array_key_exists( 0, $terms) && is_object( reset( $terms ) ) ):
|
||||
$term = reset( $terms );
|
||||
$t_id = $term->term_id;
|
||||
$term_meta = get_option( "taxonomy_$t_id" );
|
||||
$latitude = sportspress_array_value( $term_meta, 'sp_latitude', '40.7324319' );
|
||||
$longitude = sportspress_array_value( $term_meta, 'sp_longitude', '-73.82480799999996' );
|
||||
|
||||
Reference in New Issue
Block a user