You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate some of the AMP [soundcloud] shortcode conversion to J… (#14028)
* Migrate some of the AMP [soundcloud] shortcode handling to Jetpack
The AMP plugin allows more $url values.
For example, it allows:
[soundcloud https://soundcloud.com/bonifansius/example-track]
Whereas Jetpack's non-AMP handling only allows
[souncloud url=<url here>].
@seehttps://github.com/ampproject/amp-wp/blob/e798258c22c465d60b4bd259f31d32c52817d6c7/includes/embeds/class-amp-soundcloud-embed.php#L128
* Copy a comment from the AMP plugin to this
This is important to explain
where the conversion will happen.
* Commit Jeremy's suggestion to check for the URL being empty
Co-Authored-By: Jeremy Herve <jeremy@tagada.hu>
* Add a unit test for the AMP [soundcloud] logic
This should run only if it's an AMP endpoint,
and if the URL is not empty().
* Skip this test on wp.com environments, copying Jeremy's snippet
Use Jeremy's snippet that we've used on
other shortcode PRs.
0 commit comments