WordPress.org

Ready to get started?Download WordPress

Forums

Adding a site to the list of whitelisted Embed sites (2 posts)

  1. jamesgrayking
    Member
    Posted 4 months ago #

    Hi all - I am trying to work my way through the support piece on adding new sites to embed video from. I presently have a vimeo embed that allows for responsive videos which is very important on the site I am using. The shortcode for that is [vimeo id="mrf91l" responsive="true" center="false"]

    I would like to enable something similar for FashionTube that works either the same way or with something like: [embed responsive="true"]http://fashiontube.com/videos/mrf91l/unspoken/[/embed]

    I have tried to follow the instructions to add fashiontube as a whitelisted site in the functions.php file as detailed on http://codex.wordpress.org/Function_Reference/wp_oembed_add_provider

    But I think I may be missing something or approaching it the wrong way. What I have presently entered is `function wp_oembed_add_provider( $format, $provider, $regex = false ) {
    require_once( ABSPATH . WPINC . '/class-oembed.php' );
    $oembed = _wp_oembed_get_object();
    $oembed->providers[$format] = array( $provider, $regex );
    }
    wp_oembed_add_provider( 'http://fashiontube.com/*', 'http://fashiontube.com/oembedprovider' );
    `

    - This does not do anything although my PHP understanding is somewhat perfunctory at best!

    Any help with this would be greatly appreciated!!

  2. jamesgrayking
    Member
    Posted 3 months ago #

    Hi all - I wanted to checkin again to see if anyone had a solution for this?

    Thanks!

Reply

You must log in to post.

About this Topic