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

Conversation

Projects
None yet
2 participants
@aduth
Member

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.

$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() {

This comment has been minimized.

@youknowriad

youknowriad Feb 19, 2018

Contributor

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

This comment has been minimized.

@aduth

aduth Feb 19, 2018

Member

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

This comment has been minimized.

@aduth

aduth Feb 19, 2018

Member

Corrected in rebased 60e1e0d.

Compat: Remove unnecessary api-request shim
Added in WordPress 4.9
@youknowriad

LGTM 👍

@aduth aduth merged commit e3da1a1 into master Feb 19, 2018

2 checks passed

codecov/project 34.4% remains the same compared to b4ba42b
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@aduth aduth deleted the remove/api-request-shim branch Feb 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment