Making WordPress.org

Changeset 2686


Ignore:
Timestamp:
03/03/2016 08:13:02 PM (8 years ago)
Author:
Otto42
Message:

Enable auto-approval of theme updates. Added debugging code to email me about these occurances, to be removed ASAP.

File:
1 edited

Legend:

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

    r2551 r2686  
    597597                    'priority'  => $this->trac_ticket->priority,
    598598                ) );
     599
     600                // temporary debugging - email Otto when this specific branch occurs TODO remove this after testing
     601                wp_mail( 'otto@wordpress.org', 'Theme ticket creation '. $ticket_id, 'https://themes.trac.wordpress.org/ticket/' . $ticket_id, 'From:       themes@wordpress.org' );
    599602            }
    600603
     
    608611                'priority'  => $this->trac_ticket->priority,
    609612            ) );
     613
     614            // Theme review team auto-approves theme-updates, so mark the theme as live immediately, without sending additional email
     615            // Note that this only applies to new ticket creation, so it won't happen on themes with existing outstanding tickets
     616            if ( $this->trac_ticket->priority == 'theme update' ) {
     617                $this->trac->ticket_update( $ticket_id, 'Theme Update for existing Live theme - automatically approved', array( 'action' => 'approve_and_live' ), false );
     618                // temporary debugging - email otto about it TODO remove this after testing
     619                wp_mail( 'otto@wordpress.org', 'Theme update auto approval '. $ticket_id, 'https://themes.trac.wordpress.org/ticket/' . $ticket_id, 'From: themes@wordpress.org' );
     620
     621            }
     622
    610623        }
    611624
Note: See TracChangeset for help on using the changeset viewer.