Modifying The Output of image_send_to_editor
-
Hello.
I’m trying to modify the output of the image_send_to_editor from this pattern;
[caption id="attachment_9" align="aligncenter" width="450" caption="Pretty Erika"]<a href="https://localhost/guan/wp-content/uploads/2010/11/ncc-06d.jpg"<strong>><img</strong> id="img-9" class="size-full wp-image-9" title="Pretty Erika" src="https://localhost/guan/wp-content/uploads/2010/11/ncc-06d.jpg" alt="Pretty Erika" width="450" height="600" /><strong></a></strong>[/caption]
Into;
[caption id="attachment_9" align="aligncenter" width="450" caption="Pretty Erika"]<a href="https://localhost/guan/wp-content/uploads/2010/11/ncc-06d.jpg"><strong>[New Tab]</a></strong><img id="img-9" class="size-full wp-image-9" title="Pretty Erika" src="https://localhost/guan/wp-content/uploads/2010/11/ncc-06d.jpg" alt="Pretty Erika" width="450" height="600" />[/caption]
So far this is my functions
function the_function($html, $id, $caption, $title, $align, $url, $size, $alt) { $html = <'<a href="' . esc_attr($url) . "\"$rel>[New Tab]</a>$html"; return $html; }
But it doesn’t work the way I want it.
Please help.
Thank you very much.
- The topic ‘Modifying The Output of image_send_to_editor’ is closed to new replies.