bp_core_help_embed_video( $attr, $content_url = '' )
Dynamically Embed the Video
Description
Parameters
- $attr
-
(Required)
Return
(mixed)
Source
File: bp-core/bp-core-help.php
function bp_core_help_embed_video( $attr, $content_url = '' ) { $width = isset( $attr['width'] ) ? $attr['width'] : 500; $height = isset( $attr['height'] ) ? $attr['height'] : 500; $url = isset( $attr['url'] ) ? $attr['url'] : isset( $content_url ) ? $content_url : ''; if ( $url ) { $url = new SimpleXMLElement( $url ); $args = array( 'width' => $width, 'height' => $height, 'discover' => true, ); return wp_oembed_get( $url['href'], $args ); } else { return __( 'Video URL required', 'buddyboss' ); } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.