Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for TikTok video Embeds #19345

Merged
merged 1 commit into from
Feb 9, 2020

Conversation

audrasjb
Copy link
Contributor

@audrasjb audrasjb commented Dec 27, 2019

Description

Fixes #19342

This Pull Request adds TikTok oEmbed support.
For reference, see the related Trac ticket for WP 5.4: https://core.trac.wordpress.org/ticket/49083

How has this been tested?

Copy this test URL into the editor: https://www.tiktok.com/@scout2015/video/6718335390845095173

For reference:
TikTok oEmbed developer documentation: https://developers.tiktok.com/doc/Embed

Screenshots

screencapture-localhost-8888-testing-features-test4-wp-admin-post-php-2019-12-27-11_48_18

Types of changes

New feature (non-breaking change which adds functionality)
Introduce a oEmbed block support for a new resource: TikTok.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.

@audrasjb
Copy link
Contributor Author

audrasjb commented Dec 27, 2019

Fixes: #19342

@mkaz
Copy link
Member

mkaz commented Jan 1, 2020

Did not work for me.

Steps:

  1. Applied the patch, built Gutenberg
  2. Confirmed TikTok embed shows in block library
  3. Insert TikTok block and paste link: https://www.tiktok.com/@scout2015/video/6718335390845095173

Screenshot from 2020-01-01 08-21-17

In console:

Received HTML:

 index.js:287:17
Received plain text:

 https://www.tiktok.com/@scout2015/video/6718335390845095173 index.js:288:17
Processed HTML piece:

 <p>https://www.tiktok.com/@scout2015/video/6718335390845095173</p>

I confirmed other embeds work by embedding a YouTube video with no problems.

@jblz
Copy link
Contributor

jblz commented Jan 1, 2020

@mkaz -- I think this needs the core patch in https://core.trac.wordpress.org/ticket/49083 to work since it leverages the core embed block functionality.

@audrasjb
Copy link
Contributor Author

audrasjb commented Jan 1, 2020

Ah yes sorry @mkaz I forgot to mention it has to be tested with the core patch. Thanks @jblz !

@talldan talldan added [Block] Embed Affects the Embed Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement. New Block Suggestion for a new block labels Feb 4, 2020
@peterwilsoncc
Copy link
Contributor

I’m happy for the core ticket to go in to the WordPress 5.4 or 5.5 release.

If committed to 5.4 does that leave enough time for the editor changes to be committed too or do you need a little more time?

@audrasjb
Copy link
Contributor Author

audrasjb commented Feb 9, 2020

Hi there,
For information, my patch was merged in WordPress Core for 5.4: https://core.trac.wordpress.org/ticket/49083.

Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well in my tests after the patch was committed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Embed Affects the Embed Block New Block Suggestion for a new block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for TikTok videos
7 participants