Changeset 472341
- Timestamp:
- 12/08/2011 07:45:04 AM (14 years ago)
- Location:
- ninja-embed-plugin/trunk
- Files:
-
- 2 edited
-
ninja_embed_plugin.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ninja-embed-plugin/trunk/ninja_embed_plugin.php
r468227 r472341 4 4 Plugin URI: http://blog.ninjasforhire.co.za/65/ninja-embed-wordpress-plugin/ 5 5 Description: This plugin allows you to filter media links from YouTube, Vimeo and Soundcloud and also allows for shortcodes in posts e.g. [media width="400" height="225" link="http://www.vimeo.com/12345"]. In the code it can be called like this: media_embed($mediaurl, $width, $height). For both methods Width and height is to change player dimentions and is optional. 6 Version: 1. 06 Version: 1.1 7 7 Author: Ninjas for Hire 8 8 Author URI: http://www.ninjasforhire.co.za … … 49 49 // youtube 50 50 51 $youtube_key = explode('/', $mediaurl); 52 $youtube_key = explode('v=', $youtube_key[3]); 53 54 if ( isset($youtube_key[1]) ) { 51 if(strpos($mediaurl, "&v") || strpos($mediaurl, "?v")) { 52 53 $youtube_key = explode('/', $mediaurl); 54 $youtube_key = explode('v=', $youtube_key[3]); 55 55 56 $youtube_key = explode('&', $youtube_key[1]); 57 56 58 } else { 57 $youtube_key = explode('&', $youtube_key[0]); 59 60 $youtube_key = explode('?', $mediaurl); 61 62 $youtube_key[0] = substr($youtube_key[0], -11); 63 58 64 } 59 65 … … 61 67 62 68 } else { 69 63 70 echo '<p>Sorry, this media provider is not currently supported.</p>'; 71 64 72 } 65 73 -
ninja-embed-plugin/trunk/readme.txt
r468259 r472341 36 36 * First Version of the plugin 37 37 38 = 1.1 = 39 * Added support for YouTube videos on profile pages 40 38 41 == Usage == 39 42
Note: See TracChangeset
for help on using the changeset viewer.