Changeset 1965
- Timestamp:
- 10/11/2015 09:38:57 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-components.php
r1868 r1965 633 633 } 634 634 635 $maintainers = get_post_meta( $post->ID, '_active_maintainers', true ); 636 $maintainers = array_filter( array_map( 'trim', explode( ',', $maintainers ) ) ); 635 $maintainers = $this->get_maintainers_by_post( $post->ID ); 637 636 echo '<td class="no-grav maintainers">'; 638 637 foreach ( $maintainers as $maintainer ) { … … 642 641 echo '</tr>'; 643 642 } 643 644 function get_maintainers_by_post( $post_id ) { 645 return array_filter( array_map( 'trim', explode( ',', get_post_meta( $post_id, '_active_maintainers', true ) ) ) ); 646 } 647 648 function get_maintainers_by_component( $component ) { 649 return $this->get_maintainers_by_post( get_page_by_title( $component, OBJECT, 'component' )->ID ); 650 } 644 651 } 645 new Make_Core_Trac_Components; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications.php
r1917 r1965 9 9 10 10 protected $trac_subdomain; 11 protected $components; 11 12 12 13 protected $tracs_supported = array( 'core', 'meta', 'themes', 'plugins' ); … … 28 29 if ( 'core' === $trac ) { 29 30 require __DIR__ . '/trac-components.php'; 31 $this->components = new Make_Core_Trac_Components; 30 32 } 31 33 } … … 364 366 <?php 365 367 $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 ); 367 373 exit; 368 374 }
Note: See TracChangeset
for help on using the changeset viewer.