WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#6091 closed defect (bug) (fixed)

Recent Entries Widget should have a title attribute.

Reported by: topncal Owned by:
Milestone: 2.8 Priority: normal
Severity: trivial Version: 2.3.3
Component: Widgets Keywords: has-patch tested commit
Focuses: Cc:

Description

The recent entries widget should be reformatted to include a title attribute in the hyperlink.

Line 880 of /wp-includes/widgets.php should be changed from.

<li><a href="<?php the_permalink() ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?> </a></li>

to

<li><a href="<?php the_permalink() ?>" title="<?php if ( get_the_title() ) the_title(); else the_ID(); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?> </a></li>

Attachments (2)

widgets.diff (688 bytes) - added by topncal 6 years ago.
6091.diff (733 bytes) - added by Denis-de-Bernardy 5 years ago.
patch against 11250

Download all attachments as: .zip

Change History (8)

topncal6 years ago

comment:1 topncal6 years ago

  • Keywords has-patch added

I went back and read the whole document about submitting a bug. :-) You learn alot when you RTFM, anyway I included the bug fix.

comment:2 ionfish6 years ago

Perhaps I'm missing something, but what's the point of putting the post ID in the title? Surely it would make more sense not to give the link a title attribute at all when an entry has no title.

comment:3 ryan5 years ago

  • Component changed from General to Widgets
  • Owner anonymous deleted

Denis-de-Bernardy5 years ago

patch against 11250

comment:4 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.9 to 2.8

comment:5 Denis-de-Bernardy5 years ago

  • Keywords tested commit added
  • Severity changed from normal to trivial

comment:6 ryan5 years ago

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

(In [11293]) Add title attributes to links in recent entries widget. Props topncal, Denis-de-Bernardy. fixes #6091

Note: See TracTickets for help on using tickets.