I am making a WordPress theme and want to change the default image html. For example if you upload an image using WordPress uploader it generates the following html for your images
<a href="image_url_goes_here">
<img class="aligncenter size-full wp-image-100" src="your_src"/>
</a>
I want to change it to something like this
<div class="image-container">
<img class="aligncenter size-full wp-image-100" src="your_src"/>
</div>
This will do:
Reference snapshot:
The replacement of the anchor tag is done with a Regular Expression (RegEx), which I’m not versed with… Found it doing this search.