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

Adding a new class for properly handling Instagram oembeds in previews #263

Merged
merged 2 commits into from Sep 13, 2016

Commits on Sep 9, 2016

  1. Adding a new class for properly handling Instagram oembeds in previews

    Since the WordPress is calling the `make_clickable` function in terms of the `comment_text` filter, Instagram oEmbedes containing a plaintext link are not being properly initialised as Instagram's JS expects only a single `a` element inside the `blockquote`.
    
    This commit is programmatically removing the script element using DomDocument and is appending a custom one, which 1) load the original script only if it has not been loaded before 2) initialise the Instagram oEmbed manually (as a side effect this fixes the issue with Instagram oEmbeds not properly working when clicking the preview button multiple times).
    david-binda committed Sep 9, 2016
    Configuration menu
    Copy the full SHA
    0231af0 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2016

  1. Improved Instagram oembed class

    This commit removes the DOM Document parsing of the oEmbed response in favour of taking advantage of `oembed_fetch_url` filter for requesting the oEmbed without the script
    david-binda committed Sep 13, 2016
    Configuration menu
    Copy the full SHA
    2a13320 View commit details
    Browse the repository at this point in the history