Making WordPress.org


Ignore:
Timestamp:
05/09/2024 08:33:51 AM (19 months ago)
Author:
amieiro
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

    r13541 r13683  
    8888    }
    8989
     90    public function is_trashed(): bool {
     91        return 'trash' === $this->status;
     92    }
     93
    9094    public function is_active(): bool {
    9195        $now = new DateTimeImmutable( 'now', new DateTimeZone( 'UTC' ) );
     
    142146     */
    143147    public function set_status( string $status ): void {
    144         if ( ! in_array( $status, array( 'draft', 'publish' ), true ) ) {
     148        if ( ! in_array( $status, array( 'draft', 'publish', 'trash' ), true ) ) {
    145149            throw new InvalidStatus();
    146150        }
Note: See TracChangeset for help on using the changeset viewer.