Make WordPress Core

Opened 11 years ago

Last modified 5 years ago

#24856 new enhancement

Authors widget to highlight authors

Reported by: lancewillett's profile lancewillett Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.8
Component: Widgets Keywords: has-patch
Focuses: Cc:

Description

Add a new widget to display a grid or list of Authors in a widget. Linking to their published posts.

This is slated for 3.8. Development will occur in a plugin first.

Attachments (8)

tf-author-widget.php (3.8 KB) - added by MikeHansenMe 11 years ago.
Author Widget with Limit and Posted since option first pass
24856.diff (4.0 KB) - added by celloexpressions 10 years ago.
Core patch for adding the Authors widget as a default widget (for multi-author sites).
24856.1.diff (3.9 KB) - added by obenland 10 years ago.
24856.2.diff (4.6 KB) - added by obenland 10 years ago.
24856.3.diff (4.6 KB) - added by obenland 10 years ago.
24856.4.diff (6.0 KB) - added by MikeHansenMe 9 years ago.
24856.5.diff (4.4 KB) - added by wonderboymusic 9 years ago.
24856.6.diff (4.7 KB) - added by MikeHansenMe 8 years ago.
Refresh + adds register_widget

Download all attachments as: .zip

Change History (35)

#1 @markoheijnen
11 years ago

If we do this then we first need to look at all the current widgets and see what can be removed. personally I don't get why this should be in core. I don't see a lot of themes doing this.

#2 @sabreuse
11 years ago

On the other hand, I suspect that this might become a quite commonly-used feature IF there were a default widget for it.

#4 @markoheijnen
11 years ago

I thought about it and I don't see this work unless we add a lot of options. Showing all authors isn't always a smart thing. Like when an author wrote a post several years ago. So maybe you only want to show authors who wrote stuff in the last year.

Also maybe you only want to show editors. I see a lot of use cases what are just a little bit different. Just like the recent post widget that some people copy/paste and then extend with thumbnail or some other information

#5 @lancewillett
11 years ago

We'll start simple, it's OK if you don't want to use it.

#6 @MikeHansenMe
11 years ago

  • Cc mdhansen@… added

#7 @alexvorn2
11 years ago

  • Cc alexvornoffice@… added

#8 @DrewAPicture
11 years ago

  • Cc xoodrew@… added

+1. I think this would be a great feature for multi-author sites.

#9 @Kuzmanov
11 years ago

I don't think it's good idea all authors to be listed, because if there are 100 of them, that's a lot to be shown in the sidebar. Maybe it will be great if it only shows the last 10 active authors, m?

#10 @shaunandrews
11 years ago

  • Cc shaun@… added

#11 @jazzs3quence
11 years ago

  • Cc jazzs3quence added

@MikeHansenMe
11 years ago

Author Widget with Limit and Posted since option first pass

#12 @MikeHansenMe
11 years ago

  • Keywords has-patch 2nd-opinion added

#13 @MikeHansenMe
11 years ago

  • Keywords needs-testing added

The plugin I attached has limit and posted since as options when adding the widget. Looking for some feedback on how those are implemented to see if it is something worth adding to the plugin in the repo.

#14 @Hanni
11 years ago

  • Cc h@… added

@celloexpressions
10 years ago

Core patch for adding the Authors widget as a default widget (for multi-author sites).

#15 @celloexpressions
10 years ago

This is on the 3.8 milestone, so we need to revisit it now if we want to make that deadline.

I've attached a patch that imports the Author Widget Plugin (props obenland and MikeHansenMe) and registers it as a default widget for multi-author sites.

Keeping "decisions, not options" in mind, and considering the other defualt widgets, I think we should limit it to two options max (in addition to title). Currently those are a checkbox to show authors with no posts (I re-worded that), and avatar size. I think options like limit, orderby, exclude, show count, etc. are best left to plugins. The posted since option could definitely be useful, but would require a strong UI. If someone has ideas for that, such an option could absorb the current checkbox's functionality, but I'm not sure that it's a common enough use case. Avatar size is quite useful.

Unfortunately, this currently looks bad out-of-the-box; it really doesn't look right unless themes have added styling to float the images, avoid breaking the names, etc. We could consider bundling some basic styling, or improving the html markup to get better results on existing themes that lack specific styling for it. We can add some great styling to Twenty Fourteen, of course.

#16 @markoheijnen
10 years ago

I checked the widget out but I don't think we can include this in 3.8. I agree that it looks bad out-of-the-box but I disagree that we should add basic styling. So we need to think really well about this.

I still don't think we should add this to core. When I checked it out my first thought was there should be a description or section name where the author is writing about. The main issue what I still see is that it's impossible to make decisions and not options for a widget like this. To many ways how users want to use this type of widget.

#17 @rachelbaker
10 years ago

  • Cc rachel@… added

@obenland
10 years ago

#18 @obenland
10 years ago

  • Keywords 2nd-opinion needs-testing removed
  • Version set to trunk

Updated patch, based on 24856.diff​.

Moved to transients for caching, now deletes cache on saving of the widget.

I don't think it necessarily "looks bad", but we should consider adding default styles along the lines of the recent comments widget.

#19 @lancewillett
10 years ago

+1 to adding default styles, very basic so it's readable and the theme's style can take over for font-size, colors, etc.

@obenland
10 years ago

#20 @obenland
10 years ago

Updated patch with some basic styles.

This is how it looks in Kubrick, 2012, 2013, 2014, 2013 footer: https://cloudup.com/cexi1QryCDT

#21 @lancewillett
10 years ago

Asked rboren to take a look:

The temp hack wouldn't be needed if #14876 was fixed?
Hopefully there aren't a bunch of other widgets using author_widget. Hopefully none that'll be turned on at the same as this one. Unlikely a worry, just doing namespace diligence.

Should we namespace it better?

@obenland
10 years ago

#22 @obenland
10 years ago

Updated patch, based on markjaquith's feedback.

Added cache expiration, flush cache on user update, added braces to one-line conditionals, removed user query argument filter, removed output buffer, switched to widget-specific transients.

#23 @markoheijnen
10 years ago

Following the roadmap this shouldn't get added anymore to 3.8. Specially since no one cares to respond on my raised issues.
However I'm fine if this gets included in the twenty fourteen theme.

#24 @matt
10 years ago

  • Milestone changed from 3.8 to Future Release

This is out of the running for 3.8, but don't see any reason it couldn't come in early in another release cycle.

@MikeHansenMe
9 years ago

#25 @MikeHansenMe
9 years ago

Refreshed the patch since it did not apply anymore. Also cleaned up a some code sniffer notices in the general area.

@MikeHansenMe
8 years ago

Refresh + adds register_widget

#27 @MikeHansenMe
8 years ago

24856.6.diff moves the widget code to it's own file like 24856.5.diff and also re-adds the register_widget line in widgets.php file.

Note: See TracTickets for help on using tickets.