Making WordPress.org


Ignore:
Timestamp:
07/17/2024 11:19:52 AM (23 months ago)
Author:
psrpinto
Message:

Translate: Sync "Translation Events" from GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php

    r13800 r13906  
    4343    private string $title;
    4444    private string $description;
     45    private string $attendance_mode;
    4546
    4647    /**
     
    5657        string $status,
    5758        string $title,
    58         string $description
     59        string $description,
     60        string $attendance_mode = 'onsite'
    5961    ) {
    6062        $this->author_id = $author_id;
     
    6668        $this->set_title( $title );
    6769        $this->set_description( $description );
     70        $this->set_attendance_mode( $attendance_mode );
    6871    }
    6972
     
    103106    public function is_past(): bool {
    104107        return $this->end->is_in_the_past();
     108    }
     109
     110    public function is_remote(): bool {
     111        return 'remote' === $this->attendance_mode;
     112    }
     113
     114    public function is_hybrid(): bool {
     115        return 'hybrid' === $this->attendance_mode;
    105116    }
    106117
     
    145156    }
    146157
     158    public function attendance_mode(): string {
     159        return $this->attendance_mode;
     160    }
     161
    147162    /**
    148163     * @throws InvalidStatus
     
    163178    }
    164179
     180    public function set_attendance_mode( string $attendance_mode ): void {
     181        $this->attendance_mode = $attendance_mode;
     182    }
     183
    165184    /**
    166185     * @throws InvalidStart
Note: See TracChangeset for help on using the changeset viewer.