| [ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
BuddyPress Activity Classes.
| File Size: | 329 lines (9 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
BP_Activity_oEmbed_Extension:: (12 methods):
custom_hooks()
set_route_args()
content()
is_page()
validate_url_to_item_id()
set_oembed_response_data()
set_fallback_html()
set_iframe_title()
use_custom_iframe_sandbox_attribute()
modify_iframe()
on_activity_header()
embed_comments_button()
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. return: int|bool Activity ID on success; boolean false on failure. since: 2.6.0 param: string $url The URL to check. |
| set_oembed_response_data( $item_id ) X-Ref |
| Sets the oEmbed response data for our activity item. return: array since: 2.6.0 param: int $item_id The activity ID. |
| set_fallback_html( $item_id ) X-Ref |
| Sets a custom <blockquote> for our oEmbed fallback HTML. return: string since: 2.6.0 param: int $item_id The activity ID. |
| set_iframe_title( $item_id ) X-Ref |
| Sets a custom <iframe> title for our oEmbed item. return: string since: 2.6.0 param: int $item_id The activity ID |
| 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. return: string since: 2.6.0 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. |
| 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 truncated. return: string since: 2.6.0 param: string $retval Current embed HTML. |
| 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. since: 2.6.0 param: string $slug Template part slug requested. param: string $name Template part name requested. |
| 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 Nov 6 01:00:59 2025 | Cross-referenced by PHPXref 0.7.1 |