[ Index ]

PHP Cross Reference of BuddyPress




/src/bp-activity/classes/ -> class-bp-activity-oembed-extension.php (summary)

BuddyPress Activity Classes.

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

Defines 1 class

BP_Activity_oEmbed_Extension:: (12 methods):

Class: BP_Activity_oEmbed_Extension  - X-Ref

oEmbed handler to respond and render single activity items.

custom_hooks()   X-Ref
Custom hooks.

since: 2.6.0

set_route_args()   X-Ref
Add custom endpoint arguments.

Currently, includes 'hide_media'.

return: array
since: 2.6.0

content()   X-Ref
Output our custom embed template part.

since: 2.6.0

is_page()   X-Ref
Check if we're on our single activity page.

return: bool
since: 2.6.0

validate_url_to_item_id( $url )   X-Ref
Validates the URL to determine if the activity item is valid.

param: string   $url The URL to check.
return: int|bool Activity ID on success; boolean false on failure.
since: 2.6.0

set_oembed_response_data( $item_id )   X-Ref
Sets the oEmbed response data for our activity item.

param: int $item_id The activity ID.
return: array
since: 2.6.0

set_fallback_html( $item_id )   X-Ref
Sets a custom <blockquote> for our oEmbed fallback HTML.

param: int $item_id The activity ID.
return: string
since: 2.6.0

set_iframe_title( $item_id )   X-Ref
Sets a custom <iframe> title for our oEmbed item.

param: int $item_id The activity ID
return: string
since: 2.6.0

use_custom_iframe_sandbox_attribute( $result, $data, $url )   X-Ref
Use our custom <iframe> sandbox attribute in our oEmbed response.

WordPress sets the <iframe> sandbox attribute to 'allow-scripts' regardless
of whatever the oEmbed response is in {@link wp_filter_oembed_result()}. We
need to add back our custom sandbox value so links will work.

param: string $result The oEmbed HTML result.
param: object $data   A data object result from an oEmbed provider.
param: string $url    The URL of the content to be embedded.
return: string
since: 2.6.0

modify_iframe( $retval )   X-Ref
Modify various IFRAME-related items if embeds are allowed.

HTML modified:
- Add sandbox="allow-top-navigation" attribute. This allows links to work
within the iframe sandbox attribute.

JS modified:
- Remove IFRAME height restriction of 1000px. Fixes long embed items being

param: string $retval Current embed HTML.
return: string
since: 2.6.0

on_activity_header( $slug, $name )   X-Ref
Do stuff when our oEmbed activity header template part is loading.

Currently, removes wpautop() from the bp_activity_action() function.

param: string $slug Template part slug requested.
param: string $name Template part name requested.
since: 2.6.0

embed_comments_button()   X-Ref
Prints the markup for the activity embed comments button.

Basically a copy of {@link print_embed_comments_button()}, but modified for
the BP activity component.

since: 2.6.0

Generated: Thu May 30 01:01:06 2024 Cross-referenced by PHPXref 0.7.1