Enable AUTO assignment of Venue if the Home Team has a default Venue already set.
This commit is contained in:
@@ -138,6 +138,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
endif;
|
endif;
|
||||||
|
|
||||||
// Update venue
|
// Update venue
|
||||||
|
if ( $venue == '' ) {
|
||||||
|
$team = reset( $teams );
|
||||||
|
$team_object = get_page_by_title( stripslashes( $team ), OBJECT, 'sp_team' );
|
||||||
|
$venue = sp_get_the_term_id( $team_object->ID, 'sp_venue' );
|
||||||
|
}
|
||||||
wp_set_object_terms( $id, $venue, 'sp_venue', false );
|
wp_set_object_terms( $id, $venue, 'sp_venue', false );
|
||||||
|
|
||||||
// Update match day
|
// Update match day
|
||||||
|
|||||||
Reference in New Issue
Block a user