• I also use a filter so the comment_like table don’t store “likes” on comments which are deleted…

    add_filter('deleted_comment','cl_deleted_comment');
    function cl_deleted_comment($comment_id)
    {
      global $wpdb;
      $cl_table_name = $wpdb->prefix . "comments_likes";
      if (! $wpdb->query( $wpdb->prepare("DELETE FROM $cl_table_name WHERE like_comment_ID = $comment_id;") ) ) return false;
    }

    BR\Emil

    https://www.ads-software.com/extend/plugins/comments-likes/

  • The topic ‘[Plugin: comments-likes] Filter to remove likes on deleted comments’ is closed to new replies.