Skip to content

Instantly share code, notes, and snippets.

@stefanledin
Created February 5, 2019 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanledin/217f69291274e3636f523e1ded300dc0 to your computer and use it in GitHub Desktop.
Save stefanledin/217f69291274e3636f523e1ded300dc0 to your computer and use it in GitHub Desktop.
<?php
add_filter('img_caption_shortcode', function( $output, $attr, $content ) {
return '<figure>' . $content . '<figcaption>' . $attr['caption'] . '</figcaption></figure>';
}, 10, 3);
@ACPourya
Copy link

ACPourya commented Nov 2, 2023

Is there anyway to manipulate all the image captions, like a SVG or dashicon to all image captions of my website?
Smth like the camera logo under this photo.
https://i.stack.imgur.com/rzrhD.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment