Migrate some of the AMP [soundcloud] shortcode conversion to Jetpack#14028
Conversation
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>]. @see https://github.com/ampproject/amp-wp/blob/e798258c22c465d60b4bd259f31d32c52817d6c7/includes/embeds/class-amp-soundcloud-embed.php#L128
This is important to explain where the conversion will happen.
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: November 19, 2019. |
|
This is a lot simpler than previous shortcode PRs, as an oEmbed handler in the AMP plugin handles much of the conversion. |
jeherve
left a comment
There was a problem hiding this comment.
I just have a small suggestion.
Do you think you could also add a Unit Test to cover this scenario?
Thank you!
Co-Authored-By: Jeremy Herve <jeremy@tagada.hu>
This should run only if it's an AMP endpoint, and if the URL is not empty().
Use Jeremy's snippet that we've used on other shortcode PRs.
|
Hi @jeherve, |
|
Caution: This PR has changes that must be merged to WordPress.com |
* 8.0 Release: running changelog * Changelog: add #13921 * Changelog: add #13980 * Changelog: add #13905 * Changelog: add #13971 * Changelog: add #13984 * Changelog: add #14009 * Changelog: add #13620 * Remove things that will ship in 7.9.1 * Changelog: add 7.9.1 release (#14044) * Changelog: add base for 7.9.1 release * Update release date and post link * Changelog: add #14066 * Update changelog for 7.9.1 * Changelog: add #13405 * Changelog: add #13841 * Changelog: add #13924 * Changelog: add #13986 * Changelog: add #14010, #14028, #14053, #14055. * Changelog: add #14054 * Changelog: add #14031 * Changelog: add #14039 * Changelog: add #14050 * Changelog: add #14070 * Changelog: add #14082 * Changelog: add #14084 * Changelog: add #14111 * Changelog: add #13961 * Changelog: add #14047 * Changelog: add #14091 * Changelog: add #14108 * Changelog: add #14121
Summary
Migrates to Jetpack the AMP plugin's handling of the Jetpack
[soundcloud]shortcodeFixes ampproject/amp-wp#3309
Changes proposed in this Pull Request:
[soundcloud]shortcode handling to Jetpack from the AMP pluginIs this a new feature or does it add/remove features to an existing part of Jetpack?
Testing instructions:
wp-config.phphasdefine( 'JETPACK_DEV_DEBUG', true);/wp-admin, in the Jetpack 'Settings' page, and in the 'Writing' tab, ensure this is toggled on:[soundcloud]shortcode callback: Remove handling of Jetpack shortcodes ampproject/amp-wp#3678$ npm install && composer install&or?ampto the URL, and look at how the Soundcloud shortcode lookscheckoutthemasterbranch of Jetpack, not this PR's branch, andcheckoutthedevelopbranch of the AMP pluginmasterbranchProposed changelog entry for your changes:
Migrate some AMP-conversion of
[soundcloud]shortcode to Jetpack from the AMP plugin