Skip to:
Content
Pages
Categories
Search
Top
Bottom

block the ability to add a video to the wall


  • Raval
    Participant

    @ravals

    Hello,
    How do you block the ability to add a video to the wall of activity?
    I mean the situation when someone adds a link eg from Youtube. How to make the links loaded in the form of links with description or possibly with graphics?
    As Buddypress Activity Plus allows, using “add link”. Is it possible to set this option for each one?
    This type of mechanism works, among others, on Facebook

Viewing 2 replies - 1 through 2 (of 2 total)

  • Venutius
    Moderator

    @venutius

    I think this comes down to the bp embed function which automatically puts a recognised url into an Iframe.

    This function would undo that, however I’m not sure how it would react of other types of embeds but you could give it a try:

    add_filter( 'bp_embed_oembed_html', function( $html, $url, $attr, $rawattr ) {
        return '<a href="' . $url . '">' . $url . '</a>';
    }, 10, 4 );

    Raval
    Participant

    @ravals

    @Venutius, Works great. This is what I was looking for. I am glad that I could count on your help again. Thank you very much. You are awesome

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar