Skip to:
Content
Pages
Categories
Search
Top
Bottom

Videos (youku)


  • Baichi
    Participant

    @baichi

    I know youtube links can be embedded easily, just wondering if there’s anyway, or hope for a way, to as easily embed links from youku, It’s the Chinese youtube and it’s incredibly popular in China. I realize most users aren’t from China so I understand if it’s impossible, just wondering as most of my students are from China and it would make my life easy haha Thanks for your time!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi 🙂

    bbPress follows WordPress list here https://codex.wordpress.org/Embeds

    Oh…. Look… You should be able to 🙂

    Are you running WordPress with define('WPLANG', 'zh_CH'); in your wp-config.php?

    The WordPress language pack for zh_CH includes the following code:
    https://i18n.trac.wordpress.org/browser/zh_CN/tags/3.8.1/dist/wp-content/languages/zh_CN.php#L84

    
    83	/**
    84	 * Youku wp_embed handler
    85	 *
    86	 * Embed code last updated:
    87	 *  Wed, 06 Jun 2012 00:36:11 -0400
    88	 *
    89	 * Feel free to submit or correct URL formats here:
    90	 *  https://cn.wordpress.org/contact/
    91	 *
    92	 * @since 3.4.0
    93	 */
    94	function wp_embed_handler_youku( $matches, $attr, $url, $rawattr ) {
    95	        $embed = sprintf(
    96	                '<embed src="http://player.youku.com/player.php/sid/%1$s/v.swf" allowFullScreen="true" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>',
    97	                esc_attr( $matches['video_id'] ) );
    98	
    99	        return apply_filters( 'embed_youku', $embed, $matches, $attr, $url, $rawattr );
    100	}
    101	wp_embed_register_handler( 'youku',
    102	        '#https?://v\.youku\.com/v_show/id_(?<video_id>[a-z0-9_=\-]+)#i',
    103	        'wp_embed_handler_youku' );
    

    So as you should be able to have this in WordPress posts and pages etc that ‘should’ flow on down to bbPress to allow you to use youku 🙂

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