Add a filter to your media so that you can add the oEmbed functionality.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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