Created
June 11, 2014 08:22
-
-
Save simonlk/2bfa9af21b7a262867ce to your computer and use it in GitHub Desktop.
Add link to Soliloquy caption
This file contains hidden or 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_before_caption', 're_soliloquy_link_caption_start', 10, 5 ); | |
function re_soliloquy_link_caption_start( $html, $id, $item, $data, $i ) { | |
$html .= '<a href="' . esc_url( $item['link'] ) . '">'; | |
return $html; | |
} | |
add_filter( 'soliloquy_output_after_caption', 're_soliloquy_link_caption_end', 10, 2 ); | |
function re_soliloquy_link_caption_end( $html ) { | |
$html .= '</a>'; | |
return $html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment