Skip to:
Content

BuddyPress.org

Ticket #6772: 6772.10c-suggestion.patch

File 6772.10c-suggestion.patch, 681 bytes (added by imath, 8 years ago)
  • src/bp-activity/bp-activity-embeds.php

    diff --git src/bp-activity/bp-activity-embeds.php src/bp-activity/bp-activity-embeds.php
    index ae54f9d..696bba0 100644
    EOD; 
    307307                                $css_class = isset( $oembed->provider_name ) ? sprintf( ' provider-%s', sanitize_html_class( strtolower( $oembed->provider_name ) ) ) : '';
    308308                                $caption = sprintf( '<div class="caption%1$s" style="width:%2$s">%3$s</div>',
    309309                                        $css_class,
    310                                         round( ( $width - (int) $thumb_width ) / $width * 100 ) . '%',
     310                                        $thumb_width > $float_width ? 100 . '%' : round( ( $width - (int) $thumb_width ) / $width * 100 ) . '%',
    311311                                        $caption
    312312                                );
    313313