'', 'width' => '512', 'height' => '288', ), $atts)); if (empty($clip_id) || !is_numeric($clip_id)) return ''; if ($height && !$width) $width = intval($height * 16 / 9); if (!$height && $width) $height = intval($width * 9 / 16); return "
"; } function youtube($atts, $content=null) { extract(shortcode_atts(array( 'clip_id' => '', 'width' => '512', 'height' => '288', ), $atts)); if (empty($clip_id)) return ''; if ($height && !$width) $width = intval($height * 16 / 9); if (!$height && $width) $height = intval($width * 9 / 16); $height += 25; // Youtube Controls return ''; } function dailymotion($atts, $content=null) { extract(shortcode_atts(array( 'clip_id' => '', 'width' => '512', 'height' => '288', ), $atts)); if (empty($clip_id)) return ''; if ($height && !$width) $width = intval($height * 16 / 9); if (!$height && $width) $height = intval($width * 9 / 16); return ''; } } function ab_video_description_option_page() { echo 'Allows the user to embed Youtube, Vimeo or Dailymotion movie clips by entering a shortcode ([youtube] / [vimeo] / [dailymotion]) into the post area.
Vimeo:
1. Enter the [vimeo clip_id="XXXXXXX"] short code into any post. clip_id is the number from the clip\'s URL (e.g. http://vimeo.com/123456)
2. Optionally modify the clip\'s appearance by specifying width or height, like so: [vimeo clip_id="XXXXXXX" width="400" height="225"]
3. Using empty values for either the width or height attributes will cause AB-Video to calculate the proper dimension based on a 16:9 aspect ration.
Example: [vimeo clip_id="12345678" height="300" width=""] or [vimeo clip_id="12345678" height="" width="640"]
Youtube:
1. Enter the [youtube clip_id="XXXXXXX"] short code into any post. clip_id is the id from the clip\'s URL after v= (e.g. http://www.youtube.com/watch?v=2LbpLRZwWtE)
2. Optionally modify the clip\'s appearance by specifying width or height, like so: [youtube clip_id="XXXXXXX" width="400" height="225"]
3. Using empty values for either the width or height attributes will cause AB-Video to calculate the proper dimension based on a 16:9 aspect ration.
Example: [youtube clip_id="2LbpLRZwWtE" height="300" width=""] or [youtube clip_id="2LbpLRZwWtE" height="" width="640"]
Dailymotion:
1. Enter the [dailymotion clip_id="xdjrm7"] short code into any post. clip_id is the id from the clip\'s URL (e.g. http://www.dailymotion.com/video/xdjrm7_kylie-minogue-all-the-lovers_music#hp-v-v4)
2. Optionally modify the clip\'s appearance by specifying width or height, like so: [dailymotion clip_id="XXXXXXX" width="400" height="225"]
3. Using empty values for either the width or height attributes will cause AB-Video to calculate the proper dimension based on a 16:9 aspect ration.
Example: [dailymotion clip_id="xdjrm7" height="300" width=""] or [dailymotion clip_id="xdjrm7" height="" width="640"]`
If you find this plugin useful, please consider making a donation to support its continued development; any amount is welcome.