Browse Source

fix meta picking up get_media_embedded_in_content

windhamdavid 3 years ago
parent
commit
66986f75dc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      inc/tweaks.php

+ 1 - 1
inc/tweaks.php

@@ -209,7 +209,7 @@ function dw_opengraph() {
 	 $content = do_shortcode( apply_filters( 'the_content', $post->post_content ) );
 	 $content = do_shortcode( apply_filters( 'the_content', $post->post_content ) );
 	 $media_url = get_post_meta( get_the_ID(), 'media', true );
 	 $media_url = get_post_meta( get_the_ID(), 'media', true );
 	 $media = get_media_embedded_in_content( $content );
 	 $media = get_media_embedded_in_content( $content );
-	 if( !empty($media) ) {
+	 if( !empty($media_url) ) {
 	         $video_url = $media[0];
 	         $video_url = $media[0];
 	?>
 	?>
 	<meta property="og:video" content="<?php echo $media_url; ?>" />
 	<meta property="og:video" content="<?php echo $media_url; ?>" />