[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
Core component classes.
File Size: | 250 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
BP_Embed:: (3 methods):
__construct()
shortcode()
parse_oembed()
__construct() X-Ref |
Constructor |
shortcode( $attr, $url = '' ) X-Ref |
The {@link do_shortcode()} callback function. Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of the registered embed handlers. Next, checks the URL against the regex of registered {@link WP_oEmbed} providers if oEmbed discovery is false. If none of the regex matches and it's enabled, then the URL will be passed to {@link BP_Embed::parse_oembed()} for oEmbed parsing. return: string The embed HTML on success, otherwise the original URL. param: array $attr Shortcode attributes. param: string $url The URL attempting to be embeded. |
parse_oembed( $id, $url, $attr, $rawattr ) X-Ref |
Base function so BP components/plugins can parse links to be embedded. View an example to add support in {@link bp_activity_embed()}. on success. oEmbed failure. return: string The embed HTML on success, otherwise the original URL. param: int $id ID to do the caching for. param: string $url The URL attempting to be embedded. param: array $attr Shortcode attributes from {@link WP_Embed::shortcode()}. param: array $rawattr Untouched shortcode attributes from |
Generated: Thu Nov 21 01:00:57 2024 | Cross-referenced by PHPXref 0.7.1 |