-
Notifications
You must be signed in to change notification settings - Fork 796
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
Instagram: update embed to support new TV URLs #11329
Conversation
This updates our custom embed provider to support Instagram TV URLs, just like Core will soon: https://core.trac.wordpress.org/changeset/44486
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: February 14, 2019. |
jeherve, Your synced wpcom patch D24268-code has been updated. |
For images, display the image in the RSS feed with a link to the Instagram page. For videos, display only a link to the video.
jeherve, Your synced wpcom patch D24268-code has been updated. |
This way regardless of your version of Core, we'll remove Core's embed before to add our own.
jeherve, Your synced wpcom patch D24268-code has been updated. |
For reference: - Before change: https://regex101.com/r/A1p1yt/2 - After the change: https://regex101.com/r/A1p1yt/1
The code for replacing iframe and blockquote for URLs in terms of pre_kses does not really work, as it's expecting URL in 2nd matching group, which only exists in the first regex. The second one does not even have 2nd matching group. In order to make the code work for both regexes, this changeset updates both regexes to contain instagram.com URL in 1st matching group. Originally submitted in D24298
jeherve, Your synced wpcom patch D24268-code has been updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also took the opportunity to add some Unit Tests for Instagram, we did not have any before.
<3
Works well. Thanks!
Changes proposed in this Pull Request:
This updates our custom embed provider to support Instagram TV URLs, just like Core will soon: https://core.trac.wordpress.org/changeset/44486
I also took the opportunity to add some Unit Tests for Instagram, we did not have any before.
Testing instructions:
Proposed changelog entry for your changes: