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

Compat: Remove unnecessary api-request shim #5146

Merged
merged 1 commit into from
Feb 19, 2018
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented Feb 19, 2018

Previously: #4762
Related: #4950 (WordPress support explicitly updated)

This pull request seeks to remove the api-request JavaScript shim which had existed while WordPress 4.9 was in pre-release, in order to support the 4.8 stable release at the time. Since WordPress 4.9.x is now stable, this shim can now be removed. This effectively increases the minimum WordPress version supported by the Gutenberg plugin to 4.9.0.

Testing instructions:

Verify that the editor loads as expected, particularly that the api-request file is loaded correctly from the WordPress installation.

@aduth aduth added Framework Issues related to broader framework topics, especially as it relates to javascript REST API Interaction Related to REST API labels Feb 19, 2018
@aduth aduth force-pushed the remove/api-request-shim branch from 2d7fad0 to 9113c99 Compare February 19, 2018 17:45
lib/compat.php Outdated
$wp_api_localized_data = $wp_scripts->get_data( 'wp-api', 'data' );
if ( false !== $wp_api_localized_data ) {
wp_add_inline_script( 'wp-api-request', $wp_api_localized_data, 'before' );
function gutenberg_fix_jetpack_freeform_block_conflict() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to bring this back? or is this just a rebase issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yes, this was a bad rebase. Let me redo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected in rebased 60e1e0d.

@aduth aduth force-pushed the remove/api-request-shim branch from 9113c99 to 60e1e0d Compare February 19, 2018 19:15
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript REST API Interaction Related to REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants