Detect YouTube URL Links as Videos

If your content includes links to YouTube videos and you would like WPSSO Core to detect these links as “embedded” videos (in order to generate Open Graph video meta tags and Schema VideoObject markup), 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:

Leave a Review