Advertisement
Guest User

Untitled

a guest
Oct 5th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. <pre class="lang:css">add_filter('tc_bubble_comment' , 'my_custom_comment_buble'); /*activates the filter hook after the page/pst title*/
  2. function my_custom_comment_buble() {
  3.  if ( 0 == get_comments_number() )
  4.  return '';
  5.  
  6.  return sprintf('<span class="my-custom-bubble">%1$s %2$s</span>', /*name the css class from which attributes are collected*/
  7.                                     get_comments_number(),
  8.                                     sprintf( _n( 'comment' , 'comments' , get_comments_number(), 'customizr' ), /*the _n funtion defines the singular or plural form of comment. Note: if you want it in anyother language you have to change here. Also if you dont want the word comment to be displayed remove this line and the next*/
  9.                       number_format_i18n( get_comments_number(), 'customizr' )
  10.                        )
  11.      );
  12.  </pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement