Skip to content

Sync get post endpoints.#7006

Merged
zinigor merged 3 commits intofeature/sync-json-endpointsfrom
sync/get-post-endpoints
Apr 21, 2017
Merged

Sync get post endpoints.#7006
zinigor merged 3 commits intofeature/sync-json-endpointsfrom
sync/get-post-endpoints

Conversation

@zinigor
Copy link
Copy Markdown
Contributor

@zinigor zinigor commented Apr 20, 2017

Brings code between dotcom and Jetpack in sync for several endpoints.

Dan Walmsley and others added 2 commits April 20, 2017 00:14
Currently load_theme_functions is not being called when a post's type is "page". This is resulting in the post_tag taxonomy not being registered as a post type on themes that support tags for pages. https://[private link]

Merges r142741-wpcom.
@zinigor zinigor added [Package] Sync [Status] Needs Review This PR is ready for review. labels Apr 20, 2017
@zinigor zinigor self-assigned this Apr 20, 2017
@zinigor zinigor requested a review from timmyc April 20, 2017 00:58
In r142741 I enabled load_theme_functions for type=page.  Today we had a report of issues with the page listing in calypso for the Portfolio theme.  Confirmed the regression was introduced with the loading of theme functions so am backing out that change to investigate further.  https://[private link]

Merges r143168-wpcom.
timmyc
timmyc previously requested changes Apr 20, 2017
Copy link
Copy Markdown
Contributor

@timmyc timmyc left a comment

Choose a reason for hiding this comment

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

Looks like page might have snuck its way back in to the post_type array as noted below. Otherwise my original changes from r142741-wpcom look good


if ( isset( $args['type'] ) &&
! in_array( $args['type'], array( 'post', 'page', 'revision', 'any' ) ) &&
! in_array( $args['type'], array( 'post', 'revision', 'page', 'any' ) ) &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this appears to be a bit different then my original wpcom PR, that merge involved removing page from these arrays, so this line was:

! in_array( $args['type'], array( 'post', 'revision', 'any' ) ) &&

See 5b6081f

@zinigor zinigor changed the base branch from master to feature/sync-json-endpoints April 21, 2017 16:37
@zinigor
Copy link
Copy Markdown
Contributor Author

zinigor commented Apr 21, 2017

Master issue: #7026

@zinigor zinigor dismissed timmyc’s stale review April 21, 2017 17:31

We have agreed that the change is correct, no fix needed at this time.

@zinigor zinigor merged commit 87cab7c into feature/sync-json-endpoints Apr 21, 2017
@zinigor zinigor deleted the sync/get-post-endpoints branch April 21, 2017 17:31
@zinigor zinigor removed the [Status] Needs Review This PR is ready for review. label Apr 21, 2017
@timmyc
Copy link
Copy Markdown
Contributor

timmyc commented Apr 21, 2017

Thanks for helping me remember my revert there @zinigor - and for getting these changes to JP. 🙌

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants