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

Allow pod_exists() to work if passed a post_type name #3990

Merged
merged 2 commits into from
Mar 2, 2017

Conversation

jamesgol
Copy link
Contributor

@jamesgol jamesgol commented Feb 7, 2017

get_posts() returns an array with the results even if you are only asking for 1 post per page.

get_posts() returns an array with the results even if you are only asking for 1 post per page.
@jimtrue jimtrue added the Status: In Progress Issue or PR is currently in progress but not yet done label Feb 7, 2017
@jamesgol
Copy link
Contributor Author

jamesgol commented Feb 7, 2017

For some additional context. If you would call is_pod( $post ); on a WordPress post object (that was actually a post_type of a Pod) it would return false.

@@ -5324,6 +5324,9 @@ public function pod_exists ( $params, $type = null ) {
'post_type' => '_pods_pod',
'posts_per_page' => 1
) );
if ( is_array( $pod ) ) {
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer that there are blank lines between conditional block sets.

@sc0ttkclark sc0ttkclark changed the base branch from 2.x to release/2.7 March 2, 2017 15:00
@sc0ttkclark sc0ttkclark self-assigned this Mar 2, 2017
@sc0ttkclark sc0ttkclark added this to the Pods 2.7 milestone Mar 2, 2017
@sc0ttkclark sc0ttkclark merged commit e260cc5 into pods-framework:release/2.7 Mar 2, 2017
@sc0ttkclark sc0ttkclark removed the Status: In Progress Issue or PR is currently in progress but not yet done label Mar 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants