WordPress.org

Ready to get started?Download WordPress

Ideas

apply filter to the get_columns function in the WP_Comments_List_Table

  1. wp-buddy
    Member

    12345

    I was just wondering why there is no hook to add new columns to the comment overview.
    I guess it should be in the file wp-admin/includes/class-wp-comments-list-table.php (WP_Comments_List_Table class) and here in the function "get_columns()".

    Just an idea.

    Greetings

    Posted: 1 year ago #
  2. Ipstenu (Mika Epstein)
    Administrator

    What kind of columns are you thinking of adding?

    Posted: 1 year ago #
  3. wp-buddy
    Member

    12345

    Hey Mika and thanks for your quick response.

    I'm currently working on a rating plugin which also allows to rate comments. So it would be nice if I could display the rating of a comment on the backend comments-overview page as well.

    Posted: 1 year ago #
  4. Ipstenu (Mika Epstein)
    Administrator

    I think you already can do this: http://stv.whtly.com/2011/07/27/adding-custom-columns-to-the-wordpress-comments-admin-page/

    Unless that isn't what you meant.

    Posted: 1 year ago #
  5. Mark / t31os
    Moderator

    12345

    You can indeed add columns, i wrote a little code earlier in the week that displayed data in a custom column on the comments management page.

    Using the same approach Ipstenu has posted above.

    Posted: 1 year ago #
  6. wp-buddy
    Member

    12345

    Thanks mates, this really helped my out.
    I've used the manage_{$post_type}_posts_columns and manage_{$post_type}_posts_custom_column filter hooks already before but didn't tested the "edit-comments" one.

    As I mentioned in my first post I was looking for the hook in the "class-wp-comments-list-table.php" file but couldn't really find any definitions. So my thought was that it's just not there. Even a Google search did not solve this problem.

    Thanks for the quick help :-) Much appreciate it!

    Posted: 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    2 Votes
  • Status

    This idea has been implemented