Created
April 10, 2015 18:36
-
-
Save ericakfranz/34b427c21146bac286f7 to your computer and use it in GitHub Desktop.
Automatically wrap each Soliloquy caption text line in a paragraph tag.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'soliloquy_output_item_data', 'ekf_filter_caption_paragraph_tags', 10, 3 ); | |
function ekf_filter_caption_paragraph_tags( $image, $id, $data) { | |
// Wrap the image caption text in paragraph tags | |
$image['caption'] = wpautop( $image['caption'] ); | |
// Return the modified data. | |
return $image; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment