term_id;
?>
|
|
'id',
'order' => 'DESC',
'hide_empty' => false,
'number' => 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( reset( $terms ) ) ) :
$term = reset( $terms );
$t_id = $term->term_id;
$term_meta = get_option( "taxonomy_$t_id" );
$latitude = sp_array_value( $term_meta, 'sp_latitude', '-37.8165647' );
$longitude = sp_array_value( $term_meta, 'sp_longitude', '144.9475055' );
$address = sp_array_value( $term_meta, 'sp_address', '' );
endif;
// Sanitize latitude and longitude, fallback to default.
if ( ! is_numeric( $latitude ) || ! is_numeric( $longitude ) ) :
$latitude = '-37.8165647';
$longitude = '144.9475055';
endif;
?>
term_id;
$term_meta = get_option( "taxonomy_$t_id" );
$latitude = is_numeric( $term_meta['sp_latitude'] ) ? $term_meta['sp_latitude'] : '';
$longitude = is_numeric( $term_meta['sp_longitude'] ) ? $term_meta['sp_longitude'] : '';
$address = $term_meta['sp_address'] ? $term_meta['sp_address'] : '';
?>
|
|
|
|
|
|
|
|
term_id;
$sections = sp_get_term_sections( $t_id );
?>
|
|
|
|
__( 'Offense', 'sportspress' ),
1 => __(
'Defense',
'sportspress'
),
)
);
$sections = sp_get_term_sections( $id );
$section_names = array();
if ( is_array( $sections ) ) {
foreach ( $sections as $section ) {
if ( array_key_exists( $section, $options ) ) {
$section_names[] = $options[ $section ];
}
}
}
$columns .= implode( ', ', $section_names );
} elseif ( $column == 'sp_order' ) {
$columns = (int) get_term_meta( $id, 'sp_order', true );
}
return $columns;
}
}
new SP_Admin_Taxonomies();