[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-activity/ -> bp-activity-embeds.php (summary)

Functions related to embedding single activity items externally.

File Size: 349 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  bp_activity_setup_oembed()
  bp_activity_embed_excerpt_onclick_location_filter()
  bp_activity_embed_excerpt_onclick_location_filter_callback()
  bp_activity_embed_add_inline_styles()
  bp_activity_embed_has_activity()
  bp_activity_embed_excerpt()
  bp_activity_get_embed_excerpt()
  bp_activity_embed_media()

Functions
Functions that are not part of a class:

bp_activity_setup_oembed()   X-Ref
Loads our activity oEmbed component.

since: 2.6.0

bp_activity_embed_excerpt_onclick_location_filter( $text )   X-Ref
Catch links in embed excerpt so top.location.href can be added.

Due to <iframe sandbox="allow-top-navigation">, links in embeds can only be
clicked if invoked with top.location.href via JS.

param: string $text Embed excerpt
return: string
since: 2.6.0

bp_activity_embed_excerpt_onclick_location_filter_callback( $matches )   X-Ref
Add onclick="top.location.href" to a link.

param: array $matches Items matched by bp_activity_embed_excerpt_onclick_location_filter().
return: string
since: 2.6.0

bp_activity_embed_add_inline_styles()   X-Ref
Add inline styles for BP activity embeds.

since: 2.6.0

bp_activity_embed_has_activity( $activity_id = 0 )   X-Ref
Query for the activity item on the activity embed template.

Basically a wrapper for {@link bp_has_activities()}, but allows us to
use the activity loop without requerying for it again.

param: int $activity_id The activity ID.
return: bool
since: 2.6.0

bp_activity_embed_excerpt( $content = '' )   X-Ref
Outputs excerpt for an activity embed item.

since: 2.6.0

bp_activity_get_embed_excerpt( $content = '' )   X-Ref
Generates excerpt for an activity embed item.

param: string $content The content to generate an excerpt for.
return: string
since: 2.6.0

bp_activity_embed_media()   X-Ref
Outputs the first embedded item in the activity oEmbed template.

since: 2.6.0



Generated: Fri Mar 29 01:01:02 2024 Cross-referenced by PHPXref 0.7.1