The MU forums have moved to WordPress.org

If the blog admin is commenting, set the username to be the blog's name (5 posts)

  1. t3ch33
    Member
    Posted 15 years ago #

    If the admin of that blog is commenting, set the username to be the blog's name. I know that the admin can just set their username to be the blog name, but I want it to be automated. Is this possible?

  2. cafespain
    Member
    Posted 15 years ago #

    Yes

  3. t3ch33
    Member
    Posted 15 years ago #

    Could you please elaborate on how this would be done? I've tried tweaking the comments page and another page (a while ago-I forgot the page) and nothing worked. Please help. Thanks.

  4. cafespain
    Member
    Posted 15 years ago #

    Ahhh, you didn't ask how to achieve it, only if it was possible :) to which the answer is always yes, with work.

    You need to write a plugin that adds a filter to 'get_comment_author'. In your function look at the comment user_id and if it is set and matches the administrators user id then return the blog name.

    No need to touch anything else.

  5. t3ch33
    Member
    Posted 15 years ago #

    Ha. Funny. :)

    I don't know how to work with WP/MU plugins, filters, and functions. If anyone has any ideas on how to accomplish what cafespain suggested, please help. Thanks.

About this Topic