Created
April 21, 2017 13:54
-
-
Save jtsternberg/b7c3b5371c6f639693b8f086859ad129 to your computer and use it in GitHub Desktop.
Show the standard resolution instagram video in WP media player below content
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 | |
function dw_show_standard_res_insta_video_below_content( $content ) { | |
$video_src = get_post_meta( get_the_ID(), 'instagram_video_url_standard_resolution', true ); | |
if ( $video_src ) { | |
$content .= '[video src="' . esc_url_raw( $video_src ) . '" /]'; | |
} | |
return $content; | |
} | |
add_filter( 'the_content', 'dw_show_standard_res_insta_video_below_content', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment