WordPress.org

Ready to get started?Download WordPress

Forums

Remove hardcoded 'orcerby' in get_comments() (1 post)

  1. bobking
    Member
    Posted 4 years ago #

    Hi there,

    I'm the author of a popular plugin "Comment Rating" which allows readers voting a comment in a Likes vs. Dislikes fashion. I plan to store a form of the voting result in the comment_karma field in the comment table, and use the comment_karma field to sort the display order of the comments.

    However, get_comments() in wp-includes/comment.php hardcodes the 'orderby' field to 'comment_date_gmt'. Please make remove the hardcode.

    I was also requested by the users to avoid displaying poorly rated comments. It'd be most helpful if get_comments() allows a SQL condition to be passed. For example, 'comment_karma > -10' can be passed to the WHERE SQL statement.

    Thanks so much.
    Bob King
    http://wealthynetizen.com/

Topic Closed

This topic has been closed to new replies.

About this Topic