Following the rules of the non-oEmbed way of registring a embed profile, I cannot get this thing to work. Now I have this piece of code added to my functions.php in the active template directory:
<?php
function wp_embed_handler_zippyshare( $matches, $attr, $url, $rawattr ) {
$embed = sprintf(
'http://%1$s.zippyshare.com/v/%2$s/file.html',
esc_attr($matches[1]),
esc_attr($matches[2])
);
return apply_filters( 'embed_zippyshare', $embed, $matches, $attr, $url, $rawattr );
}
?>
<?php
function register_embed_handlers() {
wp_embed_register_handler( 'zippyshare', '#<script type=\"text/javascript\">var zippywww=\"[\d]+\";var zippyfile=\"[\d]+\";var zippydown=\"ffffff\";var zippyfront=\"000000\";var zippyback=\"ffffff\";var zippylight=\"000000\";var zippywidth=365;var zippyauto=false;var zippyvol=80;</script><script type="text/javascript" src=\"http://api\.zippyshare\.com/api/embed\.js\"></script>', 'wp_embed_handler_zippyshare' );
}
add_action('wp', 'register_embed_handlers');
?>
Did I placed the backslashes correctly and can I suppose the [\d]+ are picking up matches 1 and 2 correctly?