change the color in sprintf

I have the code like this

    $output.='<li class="'.$rcclass.'">' . 
/* translators: comments widget: 1: comment author, 2: post link */ 
sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') .

I want %1$s to have a different color than %2$s. How'd I do that here. thanks


Wrap them in <span>s with a specific class, e.g.

<span class='comment-author'>%1$s</span> on <span class='post-link'>%2$s</span>

and then adapt your CSS to show different colors for those classes.

Need Your Help

What happens with an exception thrown within a ChannelFutureListener?

java exception netty

I assumed the exception would be processed as an upstream event in the pipeline of the channel but my stack trace doesn't look that way.