Forum Replies Created

Viewing 1 replies (of 1 total)
  • I want to echo that I had the same problem. Upgrading to WordPress 3.7 broke captions. I only had to add the following. Changed the above to use esc_attr() which is the appropriate function rather than stirp_tags().

    function my_get_attachment_link_filter( $content,$id ) {
            $title = get_the_title($id);
            $new_content = str_replace('<a ', '<a title="' . esc_attr($title) . '" ', $content);
            return $new_content;
    }
    add_filter('wp_get_attachment_link', 'my_get_attachment_link_filter', 10, 4);
Viewing 1 replies (of 1 total)