Title: TBean's Replies | WordPress.org

---

# TBean

  [  ](https://wordpress.org/support/users/tbean/)

 *   [Profile](https://wordpress.org/support/users/tbean/)
 *   [Topics Started](https://wordpress.org/support/users/tbean/topics/)
 *   [Replies Created](https://wordpress.org/support/users/tbean/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/tbean/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/tbean/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/tbean/engagements/)
 *   [Favorites](https://wordpress.org/support/users/tbean/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Twenty Twelve comment badges for Admins and Editors](https://wordpress.org/support/topic/twenty-twelve-comment-badges-for-admins-and-editors/)
 *  Thread Starter [TBean](https://wordpress.org/support/users/tbean/)
 * (@tbean)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/twenty-twelve-comment-badges-for-admins-and-editors/#post-4816788)
 * 😀 You’ve truly made my day! Thank you for solving this!
 * I do have a capability manager plugin so that’s probably what changed the structure.
 * I like your solution of checking for the moderate_comments capability rather 
   than checking the roles so I substituted with that. And thanks too for the tip
   about reading the var_dump in page source! Otherwise it looked like a mess of
   text!
 * Many thanks again for your help! Now I feel a lot less stuck 🙂
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Twenty Twelve comment badges for Admins and Editors](https://wordpress.org/support/topic/twenty-twelve-comment-badges-for-admins-and-editors/)
 *  Thread Starter [TBean](https://wordpress.org/support/users/tbean/)
 * (@tbean)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/twenty-twelve-comment-badges-for-admins-and-editors/#post-4816780)
 * I added the line. A lot of text is displaying which I suppose are the various
   capabilities linked to the accounts?
 * You can see the new output [here](http://testdealsite.incharj.com/test1/this-is-a-sales-post/)
 * I see the comment from the other administrator has significantly more text than
   the subscriber.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Twenty Twelve comment badges for Admins and Editors](https://wordpress.org/support/topic/twenty-twelve-comment-badges-for-admins-and-editors/)
 *  Thread Starter [TBean](https://wordpress.org/support/users/tbean/)
 * (@tbean)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/twenty-twelve-comment-badges-for-admins-and-editors/#post-4816769)
 * Crossed my fingers and toes but I couldn’t get it to work on my site yet.
 * Maybe I didn’t place it correctly? Here’s a snippet of part of the function. 
   The global $post you mentioned is also found here earlier in the code.
 *     ```
       function twentytwelve_comment( $comment, $args, $depth ) {
       	$GLOBALS['comment'] = $comment;
       	switch ( $comment->comment_type ) :
       		case 'pingback' :
       		case 'trackback' :
       		// Display trackbacks differently than normal comments.
       	?>
       	<li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
       		<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?></p>
       	<?php
       			break;
       		default :
       		// Proceed with normal comments.
       		global $post;
       	?>
       	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
       		<article id="comment-<?php comment_ID(); ?>" class="comment">
       			<header class="comment-meta comment-author vcard">
       				<?php
       					echo get_avatar( $comment, 88 );
       					if ( $comment->user_id === $post->post_author ) {
       						$ca_label = '<span> ' . __( 'Moderator', 'twentytwelve' ) . '</span>';
       					} else {
       						$commentator_id = $comment->user_id;
       						$commentator_info = get_userdata( $commentator_id );
       						if ($commentator_info) {
       							$capabilities = $commentator_info->wp_capabilities;
       							if ( array_key_exists('editor', $capabilities ) || array_key_exists('administrator', $capabilities )) {
       								$ca_label = '<span> ' . __( 'Moderator', 'twentytwelve' ) . '</span>';
       							} else {
       							//commenter is not post author, admin, nor editor
       							$ca_label = '';
       							}
       						} else {
       						//commenter was not logged in user
       							$ca_label = '';
       						}
       					}
       					printf( '<cite><b class="fn">%1$s</b> %2$s</cite>',
       						get_comment_author_link(), $ca_label );
       					printf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
       						esc_url( get_comment_link( $comment->comment_ID ) ),
       						get_comment_time( 'c' ),
       						/* translators: 1: date, 2: time */
       						sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )
       					);
       				?>
       			</header><!-- .comment-meta -->
       ```
   
 * The test site I’m working on is [here](http://testdealsite.incharj.com/test1/this-is-a-sales-post/).
   So far only the post author is showing the badge. The last comment is also from
   an administrator and should display a Moderator badge as well.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Twenty Twelve comment badges for Admins and Editors](https://wordpress.org/support/topic/twenty-twelve-comment-badges-for-admins-and-editors/)
 *  Thread Starter [TBean](https://wordpress.org/support/users/tbean/)
 * (@tbean)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/twenty-twelve-comment-badges-for-admins-and-editors/#post-4816740)
 * Thanks for the reply bcworkz! 🙂
 * The logic of your code looks exactly like we had in mind!
    I tried the above 
   code on our test site, however it still only added the badge to the authors comments,
   and not the other administrators comments.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PayPal for WooCommerce] Authorize and Capture](https://wordpress.org/support/topic/authorize-and-capture/)
 *  Thread Starter [TBean](https://wordpress.org/support/users/tbean/)
 * (@tbean)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/authorize-and-capture/#post-4766385)
 * That’s good to hear I look forward to 1.2 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WC - APG Weight Shipping] Multiple Transport Companies](https://wordpress.org/support/topic/multiple-transport-companies/)
 *  Thread Starter [TBean](https://wordpress.org/support/users/tbean/)
 * (@tbean)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/multiple-transport-companies/#post-4732999)
 * Oh I see it now! Thank you 🙂
 * Now the plugin is exactly what I need!! Perfect!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WC - APG Weight Shipping] No shipping methods](https://wordpress.org/support/topic/no-sjipping-methods/)
 *  [TBean](https://wordpress.org/support/users/tbean/)
 * (@tbean)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/no-sjipping-methods/page/3/#post-4613062)
 * tozq – Can you explain how you did the different rates for UPS and FedEx? I can’t
   find the explanation in [http://www.artprojectgroup.es/como-se-configura-woocommerce-apg-weight-and-postcodestatecountry-shipping](http://www.artprojectgroup.es/como-se-configura-woocommerce-apg-weight-and-postcodestatecountry-shipping)
 * Thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CSSable Countdown] Time option](https://wordpress.org/support/topic/time-option/)
 *  Thread Starter [TBean](https://wordpress.org/support/users/tbean/)
 * (@tbean)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/time-option/#post-4685003)
 * Awesome! Works perfect and is my favorite countdown plugin thus far for my purposes.
   And I’ve tested too many to count over the years, both free and paid. Thanks 
   again!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CSSable Countdown] Time option](https://wordpress.org/support/topic/time-option/)
 *  Thread Starter [TBean](https://wordpress.org/support/users/tbean/)
 * (@tbean)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/time-option/#post-4684957)
 * I originally tried the shortcode in a clean install of WP and the twenty fourteen
   theme and that’s when I discovered it didn’t work unfortunately. Thanks for looking
   into this!

Viewing 9 replies - 1 through 9 (of 9 total)