Created
April 7, 2017 16:10
-
-
Save IronGhost63/ca373dcb2a0439842237765b00dd79e2 to your computer and use it in GitHub Desktop.
Enable oEmbed support in wpForo
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 | |
add_filter('wpforo_get_posts', 'enable_wpforo_oembed'); | |
function enable_wpforo_oembed($content){ | |
global $wp_embed; | |
foreach($content as $single){ | |
$single['body'] = $wp_embed->autoembed( $single['body'] ); | |
$return[] = $single; | |
} | |
return $return; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment