show_rtmedia_like_counts

Show media like count.

Description

show_rtmedia_like_counts(); 

Usage

  1. if ( !function_exists( 'show_rtmedia_like_counts' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'rtmedia-for-wordpress-buddypress-and-bbpress/app/main/controllers/template/rtmedia-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = show_rtmedia_like_counts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/app/main/controllers/template/rtmedia-functions.php  
  1. function show_rtmedia_like_counts() { 
  2.  
  3. global $rtmedia; 
  4.  
  5. $options = $rtmedia->options; 
  6. $count = get_rtmedia_like(); 
  7.  
  8. if ( ! ( isset( $options['general_enableLikes'] ) && 0 === intval( $options['general_enableLikes'] ) ) ) { 
  9. $class = ''; 
  10.  
  11. if ( ! intval( $count ) ) { 
  12. $class = 'hide'; 
  13. ?> 
  14. <div class='rtmedia-like-info <?php echo $class; ?>'> 
  15. <i class="rtmicon-thumbs-up rtmicon-fw"></i> 
  16. <span class="rtmedia-like-counter-wrap"> 
  17. <?php 
  18. if ( class_exists( 'RTMediaLike' ) && function_exists( 'rtmedia_who_like_html' ) ) { 
  19. $rtmedialike = new RTMediaLike(); 
  20. echo rtmedia_who_like_html( $count, $rtmedialike->is_liked( rtmedia_id() ) ); 
  21. ?> 
  22. </span> 
  23. <?php 
  24. ?> 
  25. </div> 
  26. <?php 
  27.