Skip to content

Implement auto-embedding of video URLs [fixed]#83

Open
jas8522 wants to merge 3 commits intoagentevolution:masterfrom
jas8522:auto-embed-videos
Open

Implement auto-embedding of video URLs [fixed]#83
jas8522 wants to merge 3 commits intoagentevolution:masterfrom
jas8522:auto-embed-videos

Conversation

@jas8522
Copy link

@jas8522 jas8522 commented Jan 27, 2019

This change auto-detects the use of an embeddable video URL and automatically embeds the video when possible, falling back to existing behaviour of displaying the link.

Uses WordPress wp_oembed_get function to auto-embed YouTube/Vimeo links
etc.
Simplify code by introducing $video_url variable and updates to support
a false return value from wp_oembed_get.

Could probably still use better URL detection (such as if the admin
enters a URL without the ‘http://'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants