Making WordPress.org


Ignore:
Timestamp:
10/11/2015 09:38:57 PM (9 years ago)
Author:
nacin
Message:

Trac Notifications: Return a list of component maintainers as stored in WP back to Trac.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications.php

    r1917 r1965  
    99
    1010    protected $trac_subdomain;
     11    protected $components;
    1112
    1213    protected $tracs_supported = array( 'core', 'meta', 'themes', 'plugins' );
     
    2829        if ( 'core' === $trac ) {
    2930            require __DIR__ . '/trac-components.php';
     31            $this->components = new Make_Core_Trac_Components;
    3032        }
    3133    }
     
    364366    <?php
    365367        $this->ticket_notes( $ticket, $username );
    366         wp_send_json_success( array( 'notifications-box' => ob_get_clean() ) );
     368        $send = array( 'notifications-box' => ob_get_clean() );
     369        if ( isset( $this->components ) ) {
     370            $send['maintainers'] = $this->components->get_maintainers_by_component( $ticket->component );
     371        }
     372        wp_send_json_success( $send );
    367373        exit;
    368374    }
Note: See TracChangeset for help on using the changeset viewer.