WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 6 months ago

#37801 new feature request

Media Functions

Reported by: daniyalahmedk Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords: dev-feedback needs-patch
Focuses: Cc:
PR Number:

Description

I think now WordPress should include all media functions, like

getMedaTitle($attID)
getMedaCaption($attID)
getMedaAlt($attID)
getMedaUrl($attID)
getMedaUrl($attID)

I will be really happy to work on it and include them in 4.7

Change History (4)

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to Media

#2 @joemcgill
3 years ago

Hi @daniyalahmedk,

Thank you for the request. I'm curious if you're thinking of functions that would be significantly different from wp_get_attachment_image_url() and wp_get_attachment_image_caption()?

Also, you may want to take a look at the start of conversations about wp_get_attachment_image_alt() on #36735.

There also might be some useful history in #8732.

#3 @daniyalahmedk
3 years ago

Hi @joemcgill

I am thinking about complete media library functions. We are still missing many functions for media for example getting title, format,size,uri,url etc etc.

And some specific functions for audio's and video's. For example getting

 wp_get_attachment_image_url()

got some arguments ($size) which doesn't make any meaning. If we are going to use it for audio's

Thanks!

#4 @desrosj
6 months ago

  • Keywords dev-feedback needs-patch added
Note: See TracTickets for help on using tickets.