我只想过滤出类型视频后的内容,我已经分离出嵌入式视频,现在我只想过滤出内容。
// Only get video from the content if a playlist isn't present.
if ( false === strpos( $content, 'wp-playlist-script' ) ) {
$video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) );
}
if ( is_single() ) {
// If not a single post, highlight the video file.
if ( ! empty( $video ) ) {
echo '<div class="blog-img">';
foreach ( $video as $video_html ) {
echo '<div class="entry-video">';
echo ($video_html);
echo '</div>';
}
echo '</div>';
};
};