wp event manager: small improvements
All checks were successful
All checks were successful
This commit is contained in:
parent
8069f747b4
commit
58b0cc44a3
1 changed files with 10 additions and 5 deletions
|
@ -48,13 +48,18 @@ final class WP_Event_Manager extends Event_Transformer {
|
||||||
* @return array The Place.
|
* @return array The Place.
|
||||||
*/
|
*/
|
||||||
public function get_location(): ?Place {
|
public function get_location(): ?Place {
|
||||||
$location = new Place();
|
|
||||||
$location_name = get_post_meta( $this->wp_object->ID, '_event_online', true );
|
$location_name = get_post_meta( $this->wp_object->ID, '_event_online', true );
|
||||||
|
|
||||||
|
if ( $location_name ) {
|
||||||
|
$location = new Place();
|
||||||
$location->set_name( $location_name );
|
$location->set_name( $location_name );
|
||||||
$location->set_sensitive( null );
|
$location->set_sensitive( null );
|
||||||
$location->set_address( $location_name );
|
$location->set_address( $location_name );
|
||||||
|
|
||||||
return $location;
|
return $location;
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the end time from the events metadata.
|
* Get the end time from the events metadata.
|
||||||
|
|
Loading…
Reference in a new issue