Opened 15 years ago
Closed 15 years ago
#11891 closed enhancement (fixed)
Make Recent Comments dashboard module configurable
Reported by: | janeforshort | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9.1 |
Component: | Widgets | Keywords: | has-patch |
Focuses: | Cc: |
Description
In 2.7, we didn't get around to this due to time, and we planned to make this dashboard widget configurable in 2.8 (then forgot). The widget should be configurable to at least let user decide how many comments to display in the widget. This ticket is only requesting that single configuration option. However, if someone wanted to get super industrious and write a patch that upgraded the Recent Comments dashboard widget to pull in the 'river of comments' instead of only displaying 5 (which winds up empty if you delete or spam those 5), that would be even more awesome. :)
Leaving in 3.0 for now in case someone steps up before freeze, but will punt if no patch in time.
Attachments (1)
Change History (12)
#1
@
15 years ago
- Component changed from Administration to Widgets
- Keywords has-patch added
- Owner set to azaozz
Taking the less industrious route, patch attached that adds a single configuration option for how many comments to display in the widget. In the patch the count is restricted to <= 10.
#2
follow-ups:
↓ 3
↓ 6
@
15 years ago
I think I'll piggyback this long overdue issue into this ticket while we're on the Recent Comments topic.
The Recent Comments core code actually adds an inline non-configurable css:
<style type="text/css">.recentcomments a{display:inline !important; padding:0 !important;margin:0 !important;}</style>
This is done in default-widgets.php.
I think it's really bad practice because
- it's not configurable
- it's not removable or overridable due to !important - when I tried to remove the filter, I found that it had a non-unique changing name WP_Widget_Recent_Commentsrecent_comments_style25
Somebody even created a blog post about this issue here but the solution didn't work for me due to, most likely, changes in later versions of WP.
Specifically, in my case, I need to override the padding property.
Thoughts?
Thanks.
#3
in reply to:
↑ 2
;
follow-up:
↓ 4
@
15 years ago
Replying to archon810:
I think I'll piggyback this long overdue issue into this ticket while we're on the Recent Comments topic.
We're talking about a dashboard widget. But even if we were talking about the same widget, you shouldn't hijack tickets like this.
#4
in reply to:
↑ 3
;
follow-up:
↓ 5
@
15 years ago
Replying to nacin:
Replying to archon810:
I think I'll piggyback this long overdue issue into this ticket while we're on the Recent Comments topic.
We're talking about a dashboard widget. But even if we were talking about the same widget, you shouldn't hijack tickets like this.
I'm sorry - I confused it with the Appearance sidebar widget and didn't mean it as a hijack but rather a quick mod to the patch included here. I should read better next time. I'll file a separate ticket for my issue.
#5
in reply to:
↑ 4
@
15 years ago
Replying to archon810:
I should read better next time.
:) We've all done that before, don't worry.
I'll file a separate ticket for my issue.
Just a heads up, this method of injecting CSS is done in a few places, I imagine for a few widgets plus the gallery code as well.
#6
in reply to:
↑ 2
@
15 years ago
Opened [11928] for my issue. Sorry for the interruptions, carry on now :-]
#8
@
15 years ago
I'm good with 3.0 doing the less industrious route, but would would psyched if it wasn't limited to <=10. Could we do 5, 10, 15, 20, 25, 30? Yes, that would be a long module, but for people who delete a lot of comments/pings it would make the Recents Comments module a little more useful until a future version when we could bring in the river of comments.
#9
@
15 years ago
I committed it with 15 as the limit, the same as the public Recent Comments widget. Would have no problem upping to any number you decree :)
I think the river would be good for 3.1. If I have time next week to look into it and I've emptied my queue, I'll take a look again for 3.0 though.
Adds configuration option