Changeset 1868 for sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-components.php
- Timestamp:
- 09/10/2015 08:58:08 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-components.php
r1162 r1868 224 224 if ( ! $this->page_is_component( $post ) || doing_action( 'wp_head' ) || ! did_action( 'wp_head' ) ) { 225 225 return $content; 226 } 226 } 227 227 228 228 ob_start(); … … 263 263 ) ); 264 264 if ( $recent_posts->have_posts() ) { 265 echo "<h3>Recent posts on the blog</h3>\n<ul>";265 echo "<h3>Recent posts on the make/core blog</h3>\n<ul>"; 266 266 while ( $recent_posts->have_posts() ) { 267 267 $recent_posts->the_post(); … … 272 272 wp_reset_postdata(); 273 273 } 274 275 switch_to_blog( 34 ); // Blog ID of make/flow 276 $flow_posts = new WP_Query( array( 277 'post_type' => 'post', 278 'post_status' => 'publish', 279 'posts_per_page' => 5, 280 'tag_slug__in' => $post->post_name 281 ) ); 282 if ( $flow_posts->have_posts() ) { 283 echo "<h3>Recent posts on the make/flow blog</h3>\n<ul>"; 284 while ( $flow_posts->have_posts() ) { 285 $flow_posts->the_post(); 286 echo '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a> (' . get_the_date() . ")</li>\n"; 287 } 288 echo '</ul>'; 289 echo 'View all posts tagged <a href="' . get_term_link( $post->post_name, 'post_tag' ) . '">' . $post->post_name . "</a>.\n\n"; 290 wp_reset_postdata(); 291 } 292 restore_current_blog(); 274 293 275 294 $sub_pages = wp_list_pages( array( 'child_of' => $post->ID, 'post_type' => 'component', 'echo' => false, 'title_li' => false, 'exclude' => implode( ',', array_keys( $subcomponents ) ) ) ); … … 578 597 if ( $once ) { 579 598 $once = false; 580 echo '<thead><tr><th>Component</th><th style="width: 50px">Tickets</th><th style="width: 50px">7 Days</th><th style="width: 50px">0 Replies</th><th>Maintainers</th></tr></thead>'; 599 echo '<thead><tr><th>Component</th><th style="width: 50px">Tickets</th><th style="width: 50px">7 Days</th><th style="width: 50px">0 Replies</th><th>Maintainers</th></tr></thead>'; 581 600 } 582 601 … … 625 644 } 626 645 new Make_Core_Trac_Components; 627
Note: See TracChangeset
for help on using the changeset viewer.