WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 22 months ago

#4420 closed enhancement (fixed)

Standardize wp_list_authors like the other wp_list_* functions

Reported by: johannesries Owned by: 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 6 years ago.
4420.r10258.diff (3.2 KB) - added by jacobsantos 5 years ago.
Based off of r10258

Download all attachments as: .zip

Change History (21)

comment:1 foolswisdom7 years ago

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

comment:2 rob1n7 years ago

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

comment:3 rob1n7 years ago

  • Description modified (diff)

comment:4 Otto427 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.

comment:5 Nazgul7 years ago

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

J2000_ca6 years ago

comment:6 J2000_ca6 years ago

  • Keywords has-patch 2nd-opinion added

I used the patch from ticket 5407 to make this one

comment:7 J2000_ca6 years ago

  • Cc J2000_ca added

comment:8 thee176 years ago

I just tested it and works well for me.

comment:9 lloydbudd6 years ago

  • Milestone changed from 2.5 to 2.6

comment:10 thee176 years ago

  • Keywords get_bloginfo template tags 2nd-opinion removed

comment:11 thee176 years ago

  • Milestone changed from 2.6 to 2.7

comment:12 jacobsantos6 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.

comment:13 jacobsantos5 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'); ?>" />

jacobsantos5 years ago

Based off of r10258

comment:14 jacobsantos5 years ago

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

comment:15 jacobsantos5 years ago

  • Owner changed from anonymous to jacobsantos

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

comment:16 westi5 years ago

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

comment:17 westi5 years ago

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

comment:18 sussane3 years ago

[spam comment removed by lloydbudd]

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

comment:19 byrontem22 months ago

[spam comment removed by coffee2code]

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