Skip to content

Conversation

@brettshumaker
Copy link
Contributor

Zoninator #12

Added a register_zone_post_type method to the Zoninator class. It more easily allows users to add additional post types to zones.

It accepts one parameter, $post_types, and it can be either a string of the post type slug, or an array of post type slugs.

The method returns a boolean: true if any post types were registered, false if not.

Zoninator Automattic#12

Added a `register_zone_post_type` method to the `Zoninator` class. It more easily allows users to add additional post types to zones.

It accepts one parameter, `$post_types`, and it can be either a string of the post type slug, or an array of post type slugs.

The method returns a boolean: true if any post types were registered, false if not.
Zoninator Automattic#12

Added a comment for clarification on what the return value of `register_zone_post_type()` represents.
Zoninator Automattic#12

Removed unnecessary empty string check on `$post_type`. `post_type_exists( $post_type )` already handles the check on `$post_type` passing it on to `get_post_type_object()` which checks it with `is_scalar( $post_type)`.
Zoninator Automattic#12

Cleaned up a few code formatting issues.
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