[ 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'. since: 2.6.0 return: array |
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. since: 2.6.0 return: bool |
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. since: 2.6.0 return: int|bool Activity ID on success; boolean false on failure. |
set_oembed_response_data( $item_id ) X-Ref |
Sets the oEmbed response data for our activity item. param: int $item_id The activity ID. since: 2.6.0 return: array |
set_fallback_html( $item_id ) X-Ref |
Sets a custom <blockquote> for our oEmbed fallback HTML. param: int $item_id The activity ID. since: 2.6.0 return: string |
set_iframe_title( $item_id ) X-Ref |
Sets a custom <iframe> title for our oEmbed item. param: int $item_id The activity ID since: 2.6.0 return: string |
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. since: 2.6.0 return: string |
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. param: string $retval Current embed HTML. since: 2.6.0 return: string |
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: Sun Dec 22 01:00:54 2024 | Cross-referenced by PHPXref 0.7.1 |