Migrate the [tweet] shortcode AMP handling to Jetpack#14054
Merged
Conversation
This mainly copies the logic in the AMP plugin into Jetpack.
In that case, the width should simply be the $default_width.
There's probably no need to run absint() first, so simply set the $width.
kienstra
commented
Nov 16, 2019
kienstra
commented
Nov 16, 2019
Collaborator
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: November 19, 2019. |
jeherve
requested changes
Nov 18, 2019
Co-Authored-By: Jeremy Herve <jeremy@tagada.hu>
As Jeremy mentioned, this should not run for AMP endpoints.
Contributor
|
Caution: This PR has changes that must be merged to WordPress.com |
jeherve
added a commit
that referenced
this pull request
Nov 25, 2019
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates to Jetpack the AMP plugin's handling of the Jetpack
[tweet]shortcodeFixes ampproject/amp-wp#3309
Changes proposed in this Pull Request:
[tweet]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:
Ensure that
wp-config.phphasdefine( 'JETPACK_DEV_DEBUG', true);In
/wp-admin, in the Jetpack 'Settings' page, and in the 'Writing' tab, ensure 'Compose using shortcodes...' is toggled on:Fetch this PR's branch
Clone the AMP plugin
[tweet]shortcode callback: Remove handling of Jetpack shortcodes ampproject/amp-wp#3678$ npm install && composer install&or?ampto the URL, and look at how the tweet shortcode lookscheckoutthemasterbranch of Jetpack, not this PR's branch, andcheckoutthedevelopbranch of the AMP pluginmasterbranchProposed changelog entry for your changes:
Migrate to Jetpack the AMP handling of the
[tweet]shortcode