Make WordPress Core

Opened 17 years ago

Closed 15 years ago

Last modified 11 years ago

#4420 closed enhancement (fixed)

Standardize wp_list_authors like the other wp_list_* functions

Reported by: johannesries's profile johannesries Owned by: jacobsantos's profile jacobsantos
Milestone: 2.8 Priority: lowest
Severity: normal Version: 2.3
Component: Template Keywords: has-patch needs-testing
Focuses: Cc:

Description (last modified by rob1n)

Would be great if <meta name="author" content="<?php bloginfo('authors'); ?>" /> would generate <meta name="author" content="Name 1, Name 2, Name 3" />.

Attachments (2)

author-template.php (5.2 KB) - added by J2000_ca 16 years ago.
4420.r10258.diff (3.2 KB) - added by jacobsantos 15 years ago.
Based off of r10258

Download all attachments as: .zip

Change History (21)

#1 @foolswisdom
17 years ago

  • Milestone changed from 2.3 (trunk) to 2.4 (future)

#2 @rob1n
17 years ago

Meh, I could see the *uses* but it could be done with wp_list_authors() I'm pretty sure. Not sure though.

#3 @rob1n
17 years ago

  • Description modified (diff)

#4 @Otto42
17 years ago

wp_list_authors() outputs links to the author pages, with no way to turn it off. It also doesn't have any sort of formatting options like "between" to allow you to specify a comma and such. It also only outputs a list, using LI tags.

I agree that wp_list_authors() should be extended to cover this sort of thing, preferably by adding a lot more options:

  • link: 0 or 1, to enable or disable showing the links
  • before, after, between: to put text before,after,between each author

and so forth... Standardize it with all the other wp_list_* functions, basically.

#5 @Nazgul
16 years ago

  • Summary changed from Add list of authors to get_bloginfo to Standardize wp_list_authors like the other wp_list_* functions

#6 @J2000_ca
16 years ago

  • Keywords has-patch 2nd-opinion added

I used the patch from ticket 5407 to make this one

#7 @J2000_ca
16 years ago

  • Cc J2000_ca added

#8 @thee17
16 years ago

I just tested it and works well for me.

#9 @lloydbudd
16 years ago

  • Milestone changed from 2.5 to 2.6

#10 @thee17
15 years ago

  • Keywords get_bloginfo template tags 2nd-opinion removed

#11 @thee17
15 years ago

  • Milestone changed from 2.6 to 2.7

#12 @jacobsantos
15 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 2.7 to 2.8

Unlikely to be committed. Would be nice to get it out of the way.

#13 @jacobsantos
15 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Needs serious testing to ensure it still works.

If you want:

<meta name="author" content="Name 1, Name 2, Name 3" />

Then you would use this code snippet:

<meta name="author" content="<?php wp_list_authors('html=false; style=string'); ?>" />

15 years ago

Based off of r10258

#14 @jacobsantos
15 years ago

latest patch fixes error, so it should be good now.

#15 @jacobsantos
15 years ago

  • Owner changed from anonymous to jacobsantos

Can someone test this as to whether it is ready to go?

#16 @westi
15 years ago

(In [10570]) Enhance wp_list_authors() to support more of the standard output options. Props jacobsantos see #4420.

#17 @westi
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#18 @sussane
13 years ago

[spam comment removed by lloydbudd]

Last edited 13 years ago by lloydbudd (previous) (diff)

#19 @byrontem
11 years ago

[spam comment removed by coffee2code]

Last edited 11 years ago by coffee2code (previous) (diff)
Note: See TracTickets for help on using tickets.