Opened 19 months ago
Last modified 10 months ago
#19181 new enhancement
Make image_link_input_fields filterable to add buttons
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Media | Version: | 2.7 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
This patch makes the image_link_input_fields function filterable, so that additional buttons could be added to the Link URL section when inserting an image into a post.
In my case, I want to be able to link an image to the post it belongs to. It's a weird/tiny use case, but this filter will let me use a plugin to add it myself.
Attachments (3)
Change History (8)
Rather than a general filter on HTML output, we may wish to make an associative array of the type=button's, then filter that, then echo it.
Should be noted the patch is stale thanks to #13544. Seriously. ;)
Figured I would revisit this ticket and idea. Attaching a refreshed patch with the array of buttons filtered. How's it look?
Could probably just return that HTML input concatenated with the imploded content of the array and maintain the new lines, rather than storing in the $output variable without them. I'm sure someone else will correct me if that's not the usual style, though :)

If it helps, this is the kind of plugin I have in mind to use once this patch is introduced: http://cl.ly/2s392s1v2B2Y051A1h1x