WordPress.org

Make WordPress Core

Opened 12 months ago

Last modified 12 months ago

#24054 new enhancement

(get_)comment_class() should include a is_user_member_of_blog() class

Reported by: Viper007Bond Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.5.1
Component: Comments Keywords: has-patch
Focuses: Cc:

Description (last modified by Viper007Bond)

On multi-site, there's no way to style comments that are members of the site. You can either style the post author or all registered users (who may not have access to the site's admin area). Example use case would be a multi-author site where you want comments from all authors highlighted.

I think it'd also be cool to include what role they are so that you could style say all authors, editors, and administrators but not style contributors or something like that.

I'm not sure if this would an information exposure issue though (does it matter if it is known what role a user is or that they are a member of the site?).

Attachments (2)

24054_is-member+role.patch (1.5 KB) - added by Viper007Bond 12 months ago.
Adds both "comment-author-is-site-member" and "comment-author-role-ROLE" classes
24054_is-member.patch (1.4 KB) - added by Viper007Bond 12 months ago.
Adds only "comment-author-is-site-member" class incase we don't want to expose roles

Download all attachments as: .zip

Change History (4)

comment:1 Viper007Bond12 months ago

  • Description modified (diff)

Viper007Bond12 months ago

Adds both "comment-author-is-site-member" and "comment-author-role-ROLE" classes

Viper007Bond12 months ago

Adds only "comment-author-is-site-member" class incase we don't want to expose roles

comment:2 Viper007Bond12 months ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.