[ 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. param: string $url The URL to check. since: 2.6.0 |
set_oembed_response_data( $item_id ) X-Ref |
Sets the oEmbed response data for our activity item. return: array param: int $item_id The activity ID. since: 2.6.0 |
set_fallback_html( $item_id ) X-Ref |
Sets a custom <blockquote> for our oEmbed fallback HTML. return: string param: int $item_id The activity ID. since: 2.6.0 |
set_iframe_title( $item_id ) X-Ref |
Sets a custom <iframe> title for our oEmbed item. return: string param: int $item_id The activity ID 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. return: string 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 |
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 param: string $retval Current embed HTML. 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 Nov 21 01:00:57 2024 | Cross-referenced by PHPXref 0.7.1 |