WordPress.org

Plugin Directory

Changeset 704368


Ignore:
Timestamp:
04/26/13 19:12:20 (12 months ago)
Author:
M66B
Message:

1.182 dev workaround duplicate FB comments count

Location:
add-link-to-facebook
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • add-link-to-facebook/tags/1.181/readme.txt

    r704296 r704368  
    8282* Ukrainian (ua\_UA), thanks 
    8383 
    84 See [my other plugins](http://wordpress.org/extend/plugins/profile/m66b "Marcel Bokhorst"). 
     84See [my other plugins](http://wordpress.org/extend/plugins/profile/m66b "Marcel Bokhorst") 
    8585 
    8686== Installation == 
     
    771771 
    772772= Development version = 
    773 * ... 
     773* Workaround: number of comments (caused by Facebook bug) 
    774774 
    775775Follow these steps to install the development version: 
  • add-link-to-facebook/trunk/add-link-to-facebook-class.php

    r704276 r704368  
    25432543 
    25442544                        foreach ($fb_comments->data as $fb_comment) { 
    2545                             // Check if comment in database 
     2545                            $search_comment_id = end(explode('_', $fb_comment->id)); 
     2546 
     2547                            // Check if stored comment 
    25462548                            $stored = false; 
    25472549                            if ($stored_comments) 
    25482550                                foreach ($stored_comments as $comment) { 
    25492551                                    $fb_comment_id = get_comment_meta($comment->comment_ID, c_al2fb_meta_fb_comment_id, true); 
    2550                                     if ($fb_comment_id == $fb_comment->id) { 
     2552                                    if ($search_comment_id == end(explode('_', $fb_comment_id))) { 
    25512553                                        $stored = true; 
    25522554                                        break; 
     
    25542556                                } 
    25552557 
    2556                             // Check if comment deleted 
    2557                             $stored = $stored || in_array($fb_comment->id, $deleted_fb_comment_ids); 
     2558                            // Check if deleted comment 
     2559                            if (!$stored && $deleted_fb_comment_ids) 
     2560                                foreach ($deleted_fb_comment_ids as $deleted_fb_comment_id) 
     2561                                    if ($search_comment_id == end(explode('_', $deleted_fb_comment_id))) { 
     2562                                        $stored = true; 
     2563                                        break; 
     2564                                    } 
    25582565 
    25592566                            // Only count if not in database or deleted 
  • add-link-to-facebook/trunk/readme.txt

    r704293 r704368  
    771771 
    772772= Development version = 
    773 * ... 
     773* Workaround: number of comments (caused by Facebook bug) 
    774774 
    775775Follow these steps to install the development version: 
Note: See TracChangeset for help on using the changeset viewer.