Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_embed_handler_googlevideo [ WordPress Function ]

wp_embed_handler_googlevideo ( $matches, $attr, $url, $rawattr )
Parameters:
  • (array) $matches The regex matches from the provided regex when calling {@link wp_embed_register_handler()}.
  • (array) $attr Embed attributes.
  • (string) $url The original URL that was matched by the regex.
  • (array) $rawattr The original unmodified attributes.
See:
  • WP_Embed::register_handler()
  • WP_Embed::shortcode()
Returns:
  • (string) The embed HTML.
Defined at:



The Google Video embed handler callback. Google Video does not support oEmbed.

Source


<?php
function wp_embed_handler_googlevideo$matches$attr$url$rawattr ) {
    
// If the user supplied a fixed width AND height, use it
    
if ( !empty($rawattr['width']) && !empty($rawattr['height']) ) {
        
$width  = (int) $rawattr['width'];
        
$height = (int) $rawattr['height'];
    } else {
        list( 
$width$height ) = wp_expand_dimensions425344$attr['width'], $attr['height'] );
    }

    return 
apply_filters'embed_googlevideo''<embed type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docid=' esc_attr($matches[2]) . '&amp;hl=en&amp;fs=true" style="width:' esc_attr($width) . 'px;height:' esc_attr($height) . 'px" allowFullScreen="true" allowScriptAccess="always" />'$matches$attr$url$rawattr );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics