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

buddypress-trac noreply at wordpress.org
Wed Dec 16 03:30:31 UTC 2015


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

Comment (by r-a-y):

 `02.patch` removes most of the hackery I noted in comment:5.

 In particular:
 - This patch properly registers our own oEmbed endpoint instead of
 piggybacking off of WP's default one.  See
 `bp_activity_embed_register_rest_route()`.
 - I didn't want to duplicate many of WP's embed functions just to change a
 line or two.  For example, check out how I'm using
 `get_oembed_response_data()` in `bp_activity_embed_rest_route_callback()`.
 `get_oembed_response_data()` requires a WP post, so I'm faking one here.
 To fake the post, I moved some of the logic from
 `bp_theme_compat_reset_post() ` into a separate function,
 `bp_theme_compat_create_dummy_post()`.

 Feedback appreciated.

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


More information about the buddypress-trac mailing list