Skip to:
Content

BuddyPress.org

Ticket #3697: 3697.01.patch

File 3697.01.patch, 704 bytes (added by boonebgorges, 13 years ago)
  • bp-activity/bp-activity-functions.php

    diff --git bp-activity/bp-activity-functions.php bp-activity/bp-activity-functions.php
    index 519d004..dd68612 100644
    function bp_activity_thumbnail_content_images( $content, $link = false ) { 
    12831283        global $post;
    12841284
    12851285        preg_match_all( '/<img[^>]*>/Ui', $content, $matches );
    1286         $content = preg_replace('/<img[^>]*>/Ui', '', $content );
    1287 
     1286        $content = preg_replace('|(\[caption(.*?)\])?<img[^>]*>(\[/caption\])?|', '', $content );
     1287       
    12881288        if ( !empty( $matches ) && !empty( $matches[0] ) ) {
    12891289                // Get the SRC value
    12901290                preg_match( '/<img.*?(src\=[\'|"]{0,1}.*?[\'|"]{0,1})[\s|>]{1}/i', $matches[0][0], $src );