Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#20047 closed enhancement (fixed)

get_the_author_link() Should default to rel="author"

Reported by: ipstenu's profile Ipstenu Owned by: nacin's profile nacin
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.3.1
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

Per this WP.org forum post, the linktype of author would comply more with w3c's wibbly wobbly guidelines.

Attachments (2)

20047.diff (725 bytes) - added by Ipstenu 12 years ago.
Changing external to author
20047-2.diff (734 bytes) - added by CoenJacobs 12 years ago.
Improved version of Ipstenu's patch, using 'author external' as rel

Download all attachments as: .zip

Change History (9)

@Ipstenu
12 years ago

Changing external to author

#1 @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.4

#2 @sirzooro
12 years ago

  • Cc sirzooro added

More appropriate would be rel="author external" - these links usually leads to external websites.

#3 @ipstenu
12 years ago

They usually lead to /author/username in my experience. When I click on the post author in a post, I usually go to the in-blog page for that author.

#4 follow-up: @husobj
12 years ago

  • Cc ben@… added

I believe sirzooro is correct.

In this instance the get_the_author_link() gets the website URL that is entered into the text field on a user's profile which is usually an external URL (unless someone manually enters a link to the site), not the users post archive page.

The link to the users post archive page can be retrieved using the_author_posts_link() which already adds a rel="author" attribute.

Last edited 12 years ago by husobj (previous) (diff)

@CoenJacobs
12 years ago

Improved version of Ipstenu's patch, using 'author external' as rel

#5 in reply to: ↑ 4 @CoenJacobs
12 years ago

Replying to husobj:

I believe sirzooro is correct.

In this instance the get_the_author_link() gets the website URL that is entered into the text field on a user's profile which is usually an external URL (unless someone manually enters a link to the site), not the users post archive page.

I agree. If there was a easy way to check the url to be external, it would be nicer to check that and apply external if it really is an external link. Provided a new patch (based on Ipstenu's fix) to get this ready.

Last edited 12 years ago by CoenJacobs (previous) (diff)

#6 @SergeyBiryukov
12 years ago

  • Keywords commit added

#7 @nacin
12 years ago

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

In [20615]:

Add 'author' to rel attribute for get_the_author_link(). props sirzooro, CoenJacobs, Ipstenu. fixes #20047.

Note: See TracTickets for help on using tickets.