function bp_get_link_avatar_form_embed_html_display()
{
    if (bp_links_current_link_embed_enabled()) {
        return bp_links_current_link_embed_service()->avatar_only() ? 1 : 0;
    } else {
        return 1;
    }
}
function bp_get_link_details_form_embed_service()
{
    global $bp;
    if (!empty($_POST['link-url-embed-data'])) {
        try {
            // load service
            $service = BP_Links_Embed::LoadService(trim($_POST['link-url-embed-data']));
            // valid service?
            if ($service instanceof BP_Links_Embed_Service) {
                return $service;
            }
        } catch (BP_Links_Embed_Exception $e) {
            return false;
        }
    } elseif (bp_links_current_link_embed_enabled()) {
        return bp_links_current_link_embed_service();
    }
    return false;
}
Esempio n. 3
0
function bp_links_current_link_embed_service()
{
    global $bp;
    if (bp_links_current_link_embed_enabled()) {
        return $bp->links->current_link->embed();
    } else {
        return false;
    }
}