Hello again –
Any thoughts on this? Thinking it could be found in the wp-includes folder maybe? I poked around the functions.wp-scripts.php file but didn’t see anything related to post images.
Any help would be greatly appreciated.
Salsaturation – Thank you, that is precisely what I meant!
In reference to the stackexchange link, user onetrickpony mentioned targeting existing image/posts, “by using the regex function below,” would you have any idea which function they are referring to? I’ll need to target all existing image inside of a post so if you have any suggestions to do so, I’d love to try them out.
Thank you
great that worked… please share your code snippet as it might be useful to someone else.
I would suggest you first try a image regenerator plugin like https://wordpress.org/plugins/ajax-thumbnail-rebuild/ and see if that actually resolves the issue
Well, on second thought maybe that wasn’t exactly what I meant… image_send_to_editor is definitely where I need to put the extra DIV – but how?
Right now I have:
if( is_admin() ) {
add_filter( 'image_send_to_editor', 'wp_image_wrap_init', 10, 8 );
function wp_image_wrap_init( $html, $id, $caption, $title, $align, $url, $size, $alt ) {
return '<div id="overlay"><div id="wp-image-wrap-'. $id .'" class="wp-image-wrap">'. $html .'</div></div>';
}
}
Sorry if my syntax is off, I struggle with backend code but I certainly try!
Gonna bring this back one more time in hopes someone might know what I’m trying to accomplish… What you see here on this tumblr when you rollover an image is what I want to achieve only in wordpress world which requires me to add an extra div into image_send_to_editor filter for CSS styling purposes.
Anyone’s help would be wonderfully appreciated!
Thanks again.
Sorry meant to revisit this but just havent had time to… Will have a look later unless someone beats me to it
Ah, thanks, salsaturation – I appreciate it!