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.
To be able to show the Page Templates selector only on pages, we need to differentiate between posts and pages. Currently we are hardcoding a
postType
ofpost
in all cases.This PR adds the necessary structure for the apps to inject that post type into Gutenberg, but the changes to the apps to actually do that will come in future PRs.
I have changed the bridge code in a way that would be compatible with the existing app implementations (it would just default to
post
), so these should be fine to merge before we make changes to the apps.Part of #1463. The proper feature flag is coming up as part of #1576, and we'll need PRs in both apps to finish that issue.
To test:
From WPAndroid, hardcode the "page" postType, or try with the approach in wordpress-mobile/WordPress-Android#10775:
From WPiOS: wordpress-mobile/WordPress-iOS@c7885da
Then check with the JS debugger that the editor is initialized with the right post type.
Update release notes:
RELEASE-NOTES.txt
.