Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#31469 closed defect (bug) (fixed)

get_avatar_data() Needs More Args

Reported by: miqrogroove's profile miqrogroove Owned by:
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.2
Component: General Keywords: has-patch
Focuses: Cc:

Description

The new get_avatar_data() and its filters are too limited because they do not provide any way to change the display dimensions, or to add extra attributes without using the old existing filters on the IMG element itself.

Previously mentioned at https://core.trac.wordpress.org/ticket/22329#comment:49

Attachments (3)

miqro-31469.diff (2.5 KB) - added by miqrogroove 11 years ago.
Adds height and width args.
miqro-31469.2.diff (5.6 KB) - added by miqrogroove 11 years ago.
Also adds 'extra_attr' arg for inserting more code into avatar element.
miqro-31469.3.diff (5.7 KB) - added by miqrogroove 11 years ago.
Adjusted the defaults logic a bit.

Download all attachments as: .zip

Change History (10)

@miqrogroove
11 years ago

Adds height and width args.

@miqrogroove
11 years ago

Also adds 'extra_attr' arg for inserting more code into avatar element.

#1 @wonderboymusic
11 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.2

@miqrogroove
11 years ago

Adjusted the defaults logic a bit.

#2 @wonderboymusic
11 years ago

In 31561:

In get_avatar_data() and get_avatar(), allow height and width to be specified separately (both default to size). Also allow arbitrary attributes on the <img> via the extra_attr arg.

Props miqrogroove.
See #31469.

#3 @DrewAPicture
11 years ago

In 31591:

Adjust the description for the $extra_attr argument in the DocBlocks for get_avatar_data() and get_avatar().

See [31561]. See #31469.

This ticket was mentioned in Slack in #core by johnbillion. View the logs.


11 years ago

#5 @johnbillion
11 years ago

  • Type changed from enhancement to defect (bug)

Does this need anything else?

This ticket was mentioned in Slack in #core by drew. View the logs.


11 years ago

#7 @DrewAPicture
11 years ago

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

Let's call this fixed for 4.2.

Note: See TracTickets for help on using tickets.