[buddypress-trac] [BuddyPress Trac] #6772: BuddyPress Embeds for activity, user profiles, groups

buddypress-trac noreply at wordpress.org
Fri May 27 04:51:28 UTC 2016

#6772: BuddyPress Embeds for activity, user profiles, groups
 Reporter:  imath                   |       Owner:
     Type:  idea                    |      Status:  new
 Priority:  normal                  |   Milestone:  2.6
Component:  API                     |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |

Comment (by r-a-y):

 So in this week's dev chat, imath and I decided to scrap iframes-within-
 iframes due to potential security issues.

 Instead we're going to display an image and link to the embedded item.
 This is similar to how Facebook operates.

 `09.patch` does the following:
 - Caches the full oEmbed response for activity items so we can show the
 oEmbed thumbnail in the embed template.
 - Shows a thumbnail and caption from a WP oEmbed provider if available in
 the embed template.
 - Uses the SVG play icon from [http://ionicons.com Ionicons] (licensed
 under the MIT).  If we'd rather stick with WP's dashicons, we can do that,
 but the dashicons play icon is a little too pointy.  This is pretty much a
 cosmetic thing and isn't really pertinent.
 - In order for links to work while using `<iframe sandbox>`, I had to add
 the `sandbox="allow-top-navigation"` attribute.  The other gotcha here is
 in order for links to be clickable, links must use `top.location.href`.
 (See `bp_activity_embed_excerpt_onclick_location_filter()`.)  If we'd
 rather links open in a new window, let me know.
 - Uses a template part to output the inline CSS (see `/embeds/activity
 /css-activity.php`).  In order to auto-generate the RTL CSS, I'm
 piggybacking off of `grunt rtlcss` to generate the related RTL CSS
 template part.  As to why I'm opting for inline CSS, see comment:39.

 Here's a screenshot of a TED video in action:


Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6772#comment:40>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list