Changeset 734
- Timestamp:
- 07/01/2014 05:26:45 PM (11 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
r721 r734 172 172 173 173 function the_content( $content ) { 174 global $wpdb; 175 174 176 $post = get_post(); 175 177 if ( ! $this->page_is_component( $post ) ) { … … 242 244 echo 'Component maintainers: '; 243 245 echo '<ul class="maintainers">'; 244 foreach ( $maintainers as $maintainer ) { 245 echo '<li><a href="//profiles.wordpress.org/' . esc_attr( $maintainer ) . '">'; 246 echo '<img width="36" height="36" src="//wordpress.org/grav-redirect.php?user=' . esc_attr( $maintainer ) . '&s=36" /></a> ' . $maintainer . '</li>'; 246 foreach ( array_map( 'trim', explode( ',', $maintainers ) ) as $maintainer ) { 247 echo '<li><a href="//profiles.wordpress.org/' . esc_attr( $maintainer ) . '">' . get_avatar( get_user_by( 'login', $maintainer )->user_email, 36 ) . "</a> $maintainer</li>"; 247 248 } 248 249 echo "</ul>\n\n"; … … 253 254 254 255 $followers = $this->trac->get_col( $this->trac->prepare( "SELECT username FROM _notifications WHERE type = 'component' AND value = %s", $post->post_title ) ); 256 $followers = "'" . implode( "', '", esc_sql( $followers ) ) . "'"; 257 $followers = $wpdb->get_results( "SELECT user_login, user_nicename, user_email FROM $wpdb->users WHERE user_login IN ($followers)" ); 255 258 if ( $followers ) { 256 echo 'Contributors following this component: 259 echo 'Contributors following this component:'; 257 260 echo '<ul class="followers">'; 258 261 foreach ( $followers as $follower ) { 259 $follower = esc_attr( $follower ); 260 echo '<li><a title="' . $follower . '" href="//profiles.wordpress.org/' . $follower . '">'; 261 echo '<img width="36" height="36" src="//wordpress.org/grav-redirect.php?user=' . $follower . '&s=36" /></a></li>'; 262 echo '<li><a title="' . esc_attr( $follower->user_login ) . '" href="//profiles.wordpress.org/' . esc_attr( $follower->user_nicename ) . '">'; 263 echo get_avatar( $follower->user_email, 36 ) . '</a></li>'; 262 264 } 263 265 echo '</ul>'; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications.php
r461 r734 344 344 ?> 345 345 <a<?php echo $class; ?> title="<?php echo $follower; ?>" href="//profiles.wordpress.org/<?php echo $follower; ?>"> 346 < img width="36" height="36" src="//wordpress.org/grav-redirect.php?user=<?php echo $follower; ?>&s=36" />346 <?php echo get_avatar( get_user_by( 'login', $follower )->user_email, 36 ); ?> 347 347 <span class="username"><?php echo $follower; ?></span> 348 348 </a> 349 349 <?php endforeach; ?> 350 350 <a title="you" class="star-you" href="//profiles.wordpress.org/<?php echo esc_attr( $username ); ?>"> 351 < img width="36" height="36" src="//wordpress.org/grav-redirect.php?user=<?php echo esc_attr( $username ); ?>&s=36" />351 <?php echo get_avatar( wp_get_current_user()->user_email, 36 ); ?> 352 352 <span class="username"><?php echo $username; ?></span> 353 353 </a>
Note: See TracChangeset
for help on using the changeset viewer.