Ticket #6772: 6772.09c.two-col.patch
File 6772.09c.two-col.patch, 3.1 KB (added by , 8 years ago) |
---|
-
src/bp-activity/bp-activity-embeds.php
268 268 <svg id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M405.2,232.9L126.8,67.2c-3.4-2-6.9-3.2-10.9-3.2c-10.9,0-19.8,9-19.8,20H96v344h0.1c0,11,8.9,20,19.8,20 c4.1,0,7.5-1.4,11.2-3.4l278.1-165.5c6.6-5.5,10.8-13.8,10.8-23.1C416,246.7,411.8,238.5,405.2,232.9z"/></svg> 269 269 EOD; 270 270 271 $play_icon = sprintf( '<a rel="nofollow" class="play-btn" href="%1$s" >%2$s</a>', esc_url( $url ), $play_icon );271 $play_icon = sprintf( '<a rel="nofollow" class="play-btn" href="%1$s" onclick="top.location.href=\'%1$s\'">%2$s</a>', esc_url( $url ), $play_icon ); 272 272 } 273 273 274 274 // Thumb width 275 $width = isset( $oembed->thumbnail_width ) && 'photo' !== $oembed->type && (int) $oembed->thumbnail_width < 550 ? (int) $oembed->thumbnail_width : $width; 275 $thumb_width = isset( $oembed->thumbnail_width ) && 'photo' !== $oembed->type && (int) $oembed->thumbnail_width < 550 ? (int) $oembed->thumbnail_width : $width; 276 277 $float_width = 350; 276 278 277 279 // Set up thumb. 278 $content = sprintf( '<div class="thumb" style="max-width:%1$spx">%2$s<a href="%3$s" rel="nofollow" onclick="top.location.href=\'%3$s\'"><img src="%4$s" /></a></div>', $ width, $play_icon, esc_url( $url ), esc_url( $thumbnail ) );280 $content = sprintf( '<div class="thumb" style="max-width:%1$spx">%2$s<a href="%3$s" rel="nofollow" onclick="top.location.href=\'%3$s\'"><img src="%4$s" /></a></div>', $thumb_width, $play_icon, esc_url( $url ), esc_url( $thumbnail ) ); 279 281 280 282 // Show title. 281 283 if ( isset( $oembed->title ) ) { … … 311 313 312 314 // Print rich content. 313 315 if ( '' !== $content ) { 314 printf( '<div class="bp-activity-embed-display-media" style="max-width:%spx">%s</div>', $width, $content ); 316 printf( '<div class="bp-activity-embed-display-media%s" style="max-width:%spx">%s</div>', 317 $thumb_width < $float_width ? ' two-col' : ' one-col', 318 $thumb_width < $float_width ? $width : $thumb_width, 319 $content 320 ); 315 321 } 316 322 317 323 // Video / audio. -
src/bp-templates/bp-legacy/buddypress/assets/embeds/css-activity.php
65 65 border-radius: 6px; 66 66 } 67 67 68 .bp-activity-embed-display-media, 69 .bp-activity-embed-display-media .thumb, 70 .bp-activity-embed-display-media .thumb img { 68 .bp-activity-embed-display-media.one-col, 69 .bp-activity-embed-display-media.one-col .thumb, 70 .bp-activity-embed-display-media.one-col .thumb img { 71 width: 100%; 72 } 73 74 .bp-activity-embed-display-media.two-col .thumb, 75 .bp-activity-embed-display-media.two-col .caption { 76 display: table-cell; 77 vertical-align: top; 78 } 79 80 .bp-activity-embed-display-media.two-col .thumb img { 81 border-right: 1px solid #ccc; 82 display: block; 71 83 width: 100%; 72 84 } 73 85