Feature request: Add filter to $attach_url
-
Hi,
first of all: Thank you for your nice and time saving plugin. I’d like to suggest a little enhancement: Add a filter to the $attach_url variable, so that one could manipulate it before it is inserted to the content.Background: To load a generated PDF into my theme’s lightbox (see this: http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone), I need to attach ?iframe=true to the url.
While talking about enhancing, you could probably attach another filterable variable to manipulate the data-attributes odf the generated links, like so:
if ( $attach_url ){ $html = '<a class="link-to-pdf" href="'.$attach_url.'" rel="attachment wp-att-' .esc_attr($send_id). '" title="'.$attach_title.'"' .$attach_data. ' target="_blank">' .$html. '</a>'; }So we could insert data-attributes as well as things like rel=”gallery”
Thanks again for considering my suggestions and greetings from germany.
P.S.: I could chip in a german translation of your plugin in return 😉
The topic ‘Feature request: Add filter to $attach_url’ is closed to new replies.