Created
November 29, 2011 08:38
-
-
Save jmdodd/1404031 to your computer and use it in GitHub Desktop.
Unfilter links in captions in the WordPress Add Image dialogue
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
<?php | |
if ( ! function_exists( 'ucc_fix_image_add_caption_shortcode' ) ) { | |
function ucc_fix_image_add_caption_shortcode( $shcode, $html ) { | |
$shcode = str_replace( array( '>', '<', '"', ''' ), | |
array( '>', '<', '"', "'" ), | |
$shcode ); | |
return( $shcode ); | |
} } | |
add_filter( 'image_add_caption_shortcode', 'ucc_fix_image_add_caption_shortcode', 21, 2 ); | |
/* | |
Copyright 2011 Jennifer M. Dodd (email: jmdodd@gmail.com) | |
Released under the GPLv2 (or later). | |
*/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment