Skip to content

Instantly share code, notes, and snippets.

@BFTrick
Last active December 15, 2015 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BFTrick/5257452 to your computer and use it in GitHub Desktop.
Save BFTrick/5257452 to your computer and use it in GitHub Desktop.
Add a filter to your media so that you can add the oEmbed functionality.
<?php
// get media; could be a url to a tweet, or youtube video, or something else;
$media;
$media = apply_filters( "my_media_filter", $media );
// add filter for oEmbed
$media = apply_filters( "my_media_filter", $media );
// print embedded media
echo $media;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment