Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/31/2016 07:29:30 AM (9 years ago)
Author:
r-a-y
Message:

Activity: Add Embeds support to single activity items.

Much like the Post Embeds feature introduced in WordPress 4.4, this commit
adds support for single activity URLs to be auto-discovered by oEmbed
consumers.

This allows activity URLs to be rendered into an embeddable format on
third-party websites.

Specifically, this commit:

  • Introduces the BP_Activity_oEmbed_Component class, which hooks into WordPress' oEmbed provider API via the BP_oEmbed_Component class.
  • Renders oEmbed requests for single activity items into a template suitable for embedding.
  • Introduces embed template parts into bp-legacy - /bp-templates/bp-legacy/buddypress/assets/embeds/

See #6772.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-classes.php

    r10417 r10838  
    1414require dirname( __FILE__ ) . '/classes/class-bp-activity-feed.php';
    1515require dirname( __FILE__ ) . '/classes/class-bp-activity-query.php';
     16
     17// Embeds - only applicable for WP 4.5+
     18if ( bp_get_major_wp_version() >= 4.5 && bp_is_active( 'activity', 'embeds' ) ) {
     19    require dirname( __FILE__ ) . '/classes/class-bp-activity-oembed-component.php';
     20}
Note: See TracChangeset for help on using the changeset viewer.