Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

responding to issue 2128#2152

Closed
iamchrissmith wants to merge 4 commits intoWP-API:developfrom
iamchrissmith:issue-2128
Closed

responding to issue 2128#2152
iamchrissmith wants to merge 4 commits intoWP-API:developfrom
iamchrissmith:issue-2128

Conversation

@iamchrissmith
Copy link
Copy Markdown

reported in #2128 to check user against all visible post types

@danielbachhuber
Copy link
Copy Markdown
Member

@iamchrissmith it looks like there's a merge conflict here. Can you make sure it will merge cleanly?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can't we just do $types = get_post_types( array( 'show_in_rest' => true ), 'name' )

@iamchrissmith
Copy link
Copy Markdown
Author

@danielbachhuber yes, that works a lot better. Merge conflicts also resolved (I hope)

@danielbachhuber
Copy link
Copy Markdown
Member

@iamchrissmith will you be adding a test for this?

@iamchrissmith
Copy link
Copy Markdown
Author

I added a test for pages copied from the test_get_item_published_author and changed the name of that one to test_get_item_published_author_post to clarify. I ran out of time trying to get PHPUnit setup locally to test the test, but wanted to get these up in case someone has time to test the tests

@danielbachhuber
Copy link
Copy Markdown
Member

Thanks for your work on this, @iamchrissmith! I've started a new PR with your branch, and fixed up the tests: #2155

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants