Making WordPress.org


Ignore:
Timestamp:
07/30/2019 09:11:33 AM (5 years ago)
Author:
dd32
Message:

Theme Directory: When a theme update older than two years is uploaded, do not auto-approve the Trac ticket.

Previously the Theme Directory was incorrectly applying the 2 year cutoff to the query that the Trac Sync uses, seemingly by accident as as it was coded all updates should've been auto-approved.

Now theme updates older than two years will not have their Trac ticket auto-closed as live, and theme reviewers can review the open theme update tickets, mark as live on Trac, and have the Trac sync mark the version as live in WordPress.

See #4634.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

    r8794 r9086  
    774774            ) );
    775775
    776             // Theme review team auto-approves theme-updates, so mark the theme as live immediately, without sending additional email
     776            $theme_is_older_than_two_years = strtotime( $this->theme_post->post_modified ) < strtotime( '-2 years' );
     777
     778            // Theme review team auto-approves theme-updates, so mark the theme as live immediately, if last updated within two years.
    777779            // Note that this only applies to new ticket creation, so it won't happen on themes with existing outstanding tickets
    778             if ( $this->trac_ticket->priority == 'theme update' ) {
     780            if ( ! $theme_is_older_than_two_years && $this->trac_ticket->priority == 'theme update' ) {
    779781                $this->trac->ticket_update( $ticket_id, 'Theme Update for existing Live theme - automatically reviewed', array( 'action' => 'review' ), false );
    780782                $this->trac->ticket_update( $ticket_id, 'Theme Update for existing Live theme - automatically approved', array( 'action' => 'approve_and_live' ), false );
Note: See TracChangeset for help on using the changeset viewer.