Add transormer for WP Event Manager, closes #54 #55

Merged
linos merged 10 commits from wp_events_manager into main 2024-10-10 15:31:25 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 0e3a904fa9 - Show all commits

View file

@ -48,7 +48,7 @@ final class WP_Event_Manager extends Event_Transformer {
* @return array The Place.
*/
public function get_location(): ?Place {
$location_name = get_post_meta( $this->wp_object->ID, '_event_online', true );
$location_name = get_post_meta( $this->wp_object->ID, '_event_location', true );
if ( $location_name ) {
$location = new Place();
@ -101,7 +101,7 @@ final class WP_Event_Manager extends Event_Transformer {
if ( str_starts_with( $event_link_url, 'http' ) ) {
return array(
'type' => 'Link',
'name' => 'Video URL',
'name' => \esc_html__( 'Video URL', 'activitypub-event-bridge' ),
'href' => \esc_url( $event_link_url ),
'mediaType' => 'text/html',
);

View file

@ -134,7 +134,7 @@ class Test_WP_Event_Manager extends WP_UnitTestCase {
$this->assertContains(
array(
'type' => 'Link',
'name' => 'Video Link',
'name' => __( 'Video URL', 'activitypub-event-bridge' ),
'href' => 'https://event-federation.eu/meeting-room',
'mediaType' => 'text/html',
),