Created
April 26, 2013 06:55
-
-
Save jdevalk/5465432 to your computer and use it in GitHub Desktop.
Add excerpt to the content to be scanned by the WP SEO Video plugin
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 fix_content_input( $content, $vid ) { | |
$post = get_post( $vid['post_id'] ); | |
if ( !empty( $post->post_excerpt ) ) | |
$content = "\n" . $post->post_excerpt . "\n" . $content; | |
return $content; | |
} | |
add_filter( 'wpseo_video_index_content', 'fix_content_input', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment