Stripping and/or altering the content of a custom field (video URL)
Whipped up a nifty little parsing function for you: function wpse44048_parse_video_link( $link ) { $url=”some url”; // pass this in $parsed_url = parse_url( $url ); $host = $parsed_url[‘host’]; // check that the service exists, otherwise return false if( strpos( $host, ‘youtube.com’ ) !== false && strpos( $host, ‘youtu.be’ ) !== false && strpos( $host, ‘vimeo.com’ … Read more