[wp-hackers] Attachments medadata for custom headers/backgrounds

Andrew Nacin wp at andrewnacin.com
Wed Feb 8 20:27:46 UTC 2012

On Sun, Feb 5, 2012 at 10:03 AM, George Mamadashvili <
georgemamadashvili at gmail.com> wrote:

> Do we need to generate attachments metadata for custom headers and
> backgrounds?  If yes why?

If you upload an image to be a header or background, WordPress will
store it in the media library and will generate the metadata like it does
any other attachment. (And it can be added to posts, or what not, like
any other attachment.)

In 3.4, themes can opt into flexible/fluid header heights and widths,
rather than having a pre-defined width and height. In this case, we use
the metadata so proper width and height attributes can be added.


More information about the wp-hackers mailing list