Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#31469 closed defect (bug) (fixed)

get_avatar_data() Needs More Args

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

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 12 years ago.
Adds height and width args.
miqro-31469.2.diff​ (5.6 KB ) - added by miqrogroove 12 years ago.
Also adds 'extra_attr' arg for inserting more code into avatar element.
miqro-31469.3.diff​ (5.7 KB ) - added by miqrogroove 12 years ago.
Adjusted the defaults logic a bit.

Download all attachments as: .zip

Change History (10)

@miqrogroove
12 years ago

Adds height and width args.

@miqrogroove
12 years ago

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

#1 @wonderboymusic
12 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review → 4.2

@miqrogroove
12 years ago

Adjusted the defaults logic a bit.

#2 @wonderboymusic
12 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
12 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.


12 years ago

#5 @johnbillion
12 years ago

  • Type enhancement → defect (bug)

Does this need anything else?

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


12 years ago

#7 @DrewAPicture
12 years ago

  • Resolution → fixed
  • Status new → closed

Let's call this fixed for 4.2.

Note: See TracTickets for help on using tickets.