Ticket #6159: 6159.1.patch
File 6159.1.patch, 1.2 KB (added by , 10 years ago) |
---|
-
src/bp-activity/bp-activity-functions.php
diff --git a/src/bp-activity/bp-activity-functions.php b/src/bp-activity/bp-activity-functions.php index 1444c89..2d4100b 100644
a b function bp_activity_thumbnail_content_images( $content, $link = false, $args = 2618 2618 preg_match( '/<img.*?(height\=[\'|"]{0,1}.*?[\'|"]{0,1})[\s|>]{1}/i', $matches[0][0], $height ); 2619 2619 preg_match( '/<img.*?(width\=[\'|"]{0,1}.*?[\'|"]{0,1})[\s|>]{1}/i', $matches[0][0], $width ); 2620 2620 2621 if ( !empty( $src ) ) { 2622 $src = substr( substr( str_replace( 'src=', '', $src[1] ), 0, -1 ), 1 ); 2623 $height = substr( substr( str_replace( 'height=', '', $height[1] ), 0, -1 ), 1 ); 2624 $width = substr( substr( str_replace( 'width=', '', $width[1] ), 0, -1 ), 1 ); 2621 if ( ! empty( $src ) ) { 2622 $src = substr( substr( str_replace( 'src=', '', $src[1] ), 0, -1 ), 1 ); 2623 2624 if ( isset( $width[1] ) ) { 2625 $width = substr( substr( str_replace( 'width=', '', $width[1] ), 0, -1 ), 1 ); 2626 } 2627 2628 if ( isset( $height[1] ) ) { 2629 $height = substr( substr( str_replace( 'height=', '', $height[1] ), 0, -1 ), 1 ); 2630 } 2625 2631 2626 2632 if ( empty( $width ) || empty( $height ) ) { 2627 2633 $width = 100;