Manual import / bulk import works fine, automatic does not get YouTube URL
-
I made a modification to embed automatically (without using WordPress Shortcode) to make all YouTube videos embed when pulled to post content.
It works fine when I import manually each channel, but it does not post any URL when imported automatically by the plugin, only the video description is published.
My edit is on /wp-content/plugins/video-importer/php/class-refactored-video-source.php file, line 222:
Old:
'post_content' => "$video_array['url'] . PHP_EOL . PHP_EOL . $video_array['description'],
New:
'post_content' => "<iframe width=\"560\" height=\"315\" src=\"" . $video_array['url'] . "\" frameborder=\"0\" allowfullscreen></iframe>" . PHP_EOL . PHP_EOL . $video_array['description'],
I changed too the file /wp-content/plugins/video-importer/providers/youtube/class-refactored-youtube-importer.php , line 189:
Old:
'url' => 'https://youtu.be/' . $video->resourceId->videoId,
New:
'url' => '//www.youtube.com/embed/' . $video->resourceId->videoId,
What I need to do to make this work for automatic imports?
Thanks!
- The topic ‘Manual import / bulk import works fine, automatic does not get YouTube URL’ is closed to new replies.