Plugin Directory

Changeset 744012


Ignore:
Timestamp:
07/21/2013 05:47:53 PM (13 years ago)
Author:
bholtsclaw
Message:

1.5.1 cleanups

Location:
gplus-comments/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gplus-comments/trunk/includes/lib/frontend.php

    r743641 r744012  
    1818function comments_evolved_get_total_count() {
    1919  $total_count = 0;
    20   //$wpc_1 = get_comments_number();
    2120  $wpc = comments_evolved_get_wordpress_count();
    2221  $fbc = comments_evolved_get_facebook_count();
    2322  $gpc = comments_evolved_get_gplus_count();
    2423
    25   $total_count = $fbc + $gpc + $wpc;
     24  $total_count = $total_count + $fbc + $gpc + $wpc;
    2625  return $total_count;
    2726}
    28 //add_filter('get_comments_number', 'comments_evolved_get_total_count');
     27add_filter('get_comments_number', 'comments_evolved_get_total_count');
    2928
    3029function comments_evolved_get_wordpress_count() {
    31   global $comments_by_type;
    32   return count($comments_by_type['comment']);
     30  global $post, $comments, $wp_query, $comments_by_type;
     31  return count($wp_query->comments_by_type['comment']);
    3332}
    3433
    3534function comments_evolved_get_trackback_count() {
    36   global $comments_by_type;
    37   return count($comments_by_type['pings']);
     35  global $post, $comments, $wp_query, $comments_by_type;
     36  return count($wp_query->comments_by_type['pings']);
    3837}
    3938
    40 function comments_evolved_get_facebook_count($url) {
     39function comments_evolved_get_facebook_count($url = "") {
    4140  if(empty($url)){ $url = get_permalink(); }
    4241  $link = 'https://graph.facebook.com/?ids=' . urlencode($url);
     
    4645}
    4746
    48 function comments_evolved_get_gplus_count($url) {
     47function comments_evolved_get_gplus_count($url = "") {
    4948  include_once COMMENTS_EVOLVED_LIB . '/simple_html_dom.php';
    5049  if(empty($url)){ $url = get_permalink(); }
  • gplus-comments/trunk/includes/templates/container.php

    r743641 r744012  
    2323}
    2424?>
    25 
     25<!-- comment-tabs -->
    2626<script type="text/javascript">
    2727jQuery(document).ready(function($) {
     
    2929});
    3030</script>
    31 
    32 <!-- comment-tabs -->
    3331<div class="embed-container" id="comment-tabs">
    3432  <?php
     
    4644      $active = ' class="active"';
    4745
     46      $wordpress_count = comments_evolved_get_wordpress_count();
    4847      $gplus_count = comments_evolved_get_gplus_count();
     48      $trackback_count = comments_evolved_get_trackback_count();
    4949      $facebook_count = comments_evolved_get_facebook_count();
    50       $wordpress_count = get_comments_number();
    5150
    5251      foreach ($tab_order as &$tab) {
  • gplus-comments/trunk/includes/templates/partials/trackback.php

    r743641 r744012  
    1111<div id="trackback-tab" class="content-tab clearfix">
    1212  <?php if (!empty($comments_by_type['pings'])) : ?>
    13     <h6 id='pings'><?php printf( __( '%1$d %2$s for "%3$s"'), count($comments_by_type['pings']), __('Trackbacks'), get_the_title() )?></h6>
     13    <!-- <h6 id='pings'><?php printf( __( '%1$d %2$s for "%3$s"'), count($comments_by_type['pings']), __('Trackbacks'), get_the_title() )?></h6> -->
    1414    <ol class="commentlist">
    1515      <?php wp_list_comments('type=pings&max_depth=1'); ?>
  • gplus-comments/trunk/readme.txt

    r743641 r744012  
    103103
    104104== Change Log ==
     105= 1.5.1 =
     106* reworked css so that the embeded iFrames are now **responsive** and more mobile friendly.
     107* fixed JS for loading Livefyre so that comments made with the official plugin and this plugin are loaded in the same way.
     108* added option to show comment count on each tab label
     109* added shortcode `[comments_evolved]` and template tag `display_comments_evolved()` to display comment section in anywhere.
     110* added shortcodes and template tags to show individual and combined comment counts ( @see the [install page](http://wordpress.org/plugins/gplus-comments/installation/) for listing )
     111
     112
     113= 1.5.0 =
     114* WARNING: if you are upgrading from Google+ Comments for WordPress to Comments Evolved then the plugin will need to be manually reactivated and settings will be reset back to defaults.
     115* rebranding from "Google+ Comments" to "Comments Evolved" ... completed
     116* major code cleanups ( seperated plugin init, frontend, and backend code )
     117
    105118= 1.4.17 =
    106119* tab font adjustment
Note: See TracChangeset for help on using the changeset viewer.