Changeset 13683 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php
- Timestamp:
- 05/09/2024 08:33:51 AM (19 months ago)
- 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 88 88 } 89 89 90 public function is_trashed(): bool { 91 return 'trash' === $this->status; 92 } 93 90 94 public function is_active(): bool { 91 95 $now = new DateTimeImmutable( 'now', new DateTimeZone( 'UTC' ) ); … … 142 146 */ 143 147 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 ) ) { 145 149 throw new InvalidStatus(); 146 150 }
Note: See TracChangeset
for help on using the changeset viewer.