Detect YouTube URL Links as Videos

If your content includes links to YouTube videos (as an example) and you would like NGFB to detect these links as “embedded” videos (in order to generate Open Graph video meta tags), you can include the following PHP code in your functions.php file.

The filter assumes that the YouTube URL links in your content look like this: