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

Updated setters for Labels for both Post types and Taxonomies and set correct format for taxonomies links, post type supports and add post type taxonomies #48

Merged
merged 2 commits into from
Jan 23, 2021

Conversation

0v3rth3d4wn
Copy link
Contributor

The labels for the CPT weren't properly created and I saw that the set method was being passed a different arguments and did not mirror the construct method.

@0v3rth3d4wn 0v3rth3d4wn changed the title Updated setters for Labels for both Posttypes and Taxonomies Updated setters for Labels for both Post types and Taxonomies and set correct format for taxonomies links, post type supports and add post type taxonomies Jan 15, 2021
@0v3rth3d4wn
Copy link
Contributor Author

Updated with an additional commit to set the correct format for register_post_type and register_taxonomy, particularly for 'supports', 'taxonomies' and 'links'.

@darrenjacoby
Copy link
Owner

@0v3rth3d4wn thanks for the PR. My only concern is the removal of this section, https://github.com/soberwp/intervention/pull/48/files#diff-99e7358da92c4ba8da69d861d8cd75876a8d3f5ab1acd52a14dafb01f01c3a5bL72-L76

It converts keys using - to _ for registering post types. I liked this as it allowed users to maintain consistency with the other options of the plugin, whereas WordPress uses underscores.

Let me know your thoughts there.

@darrenjacoby darrenjacoby merged commit e86aba1 into darrenjacoby:master Jan 23, 2021
@darrenjacoby
Copy link
Owner

darrenjacoby commented Jan 23, 2021

@0v3rth3d4wn @jrgd ,

I have merged and made some upgrades (#3302825), which should enable you to also pass in a string in the option.

eg; 'genre.links' => 'book' or 'genre.links' => ['post, 'book'] would both be valid.

Also reverts the removal of the key conversion for WP (- to _).

I have tested this side, but would always appreciate confirmation that it solves the issue. Thanks again for your help!

@0v3rth3d4wn
Copy link
Contributor Author

@darrenjacoby,

I cherry picked this and it works - yes. Thank you!

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.

2 participants