phpface

Untitled

Jun 23rd, 2022
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. add_action( 'streamtube/post/meta/item', function(){
  2.     global $post;
  3.  
  4.     $total_points = mycred_display_users_balance( $post->post_author );
  5.  
  6.     if( $total_points ){
  7.         ?>
  8.         <span class="total-points d-block mb-2 text-secondary">
  9.             <?php
  10.                 printf(
  11.                     esc_html__( '%s collected %s', 'streamtube-child' ),
  12.                     '<strong class="text-secondary">'. get_userdata( $post->post_author )->display_name .'</strong>',
  13.                     '<strong class="text-info">$'. number_format_i18n( $total_points ) .'</strong>'
  14.                 );
  15.             ?>
  16.         </span>
  17.         <?php
  18.     }    
  19. } );
Add Comment
Please, Sign In to add comment