Right now, media_internet_get_provider() checks every provider to find the appropriate one for the given embed string. In some cases, it would be helpful to limit the providers it checks. One example use case would be limiting the available providers in field instance settings. In my case I'm writing a contrib module with a construct similar to field instances where this ability to filter providers would be helpful.
I've written a small patch that introduces this feature and preserves backwards compatibility. I'll upload it in a couple minutes.
Comment | File | Size | Author |
---|---|---|---|
#1 | restrict-providers-2305879-1.patch | 1.33 KB | chasingmaxwell |
Comments
Comment #1
chasingmaxwell CreditAttribution: chasingmaxwell commentedHere's the patch. I believe it can be applied to both the 7.x-2.x and 7.x-1.x branches without modification.
Comment #2
Devin Carlson CreditAttribution: Devin Carlson commentedComment #3
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 5 year old patch in #1 to media_internet.module does not apply to the latest media 7.x-2.x-dev, but feel free to submit a re-rolled patch
and a media maintainer will consider re-opening if you need this and want it reviewed.
Comment #4
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedComment #5
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedPer joseph.olstad, closing as outdated.