oik-types should be able to turn off options such as `show_in_nav_menus`
Opened this issue · 3 comments
In Gutenberg the Navigation link block ( core/navigation ) has a number of custom
variations that are dynamically generated for each of the post types that are _builtin
and/or support show_in_nav_menus
.
A lot of my CPTs are registered with show_in_nav_menus
since that is the default for CPTs which are public
.
oik-types admin doesn't have the capability of turning off the show_in_nav_menus
setting.
Requirement
- Reduce the number of variations of the
core/navigation
link that are displayed in wp-a2z.org
Proposed solution
One or more of the following:
- Do nothing
- Update the plugins that register the CPTs to set
show_in_nav_menus
to false. - Update
bw_register_post_type()
to set theshow_in_nav_menus
value to false if it's not set. - Change oik-types to support turning off of these boolean fields.
Option 1. may also require the oik-types CPT override to be changed.
Note: In wp-a2z.org and/or oik-plugins there are many variations, for both the CPTs and their taxonomies.
- The first 4 are for WordPress core.
- The next 22 are CPTs
- The remaining 12 are custom taxonomies
Option | CPT / Taxonomy link |
---|---|
0 | core/navigation-link post,Custom Link Post Link |
0 | core/navigation-link page,Custom Link Page Link |
0 | core/navigation-link category,Custom Link Category Link |
0 | core/navigation-link tag,Custom Link Tag Link |
1 / 2 | core/navigation-link oik_edd_apikey,Custom Link oik EDD API key Link |
1 / 2 | core/navigation-link oik_shortcodes,Custom Link Shortcode Link |
1 / 2 | core/navigation-link oik_sc_param,Custom Link Shortcode parameter Link |
1 / 2 | core/navigation-link shortcode_example,Custom Link Shortcode example Link |
1 / 2 | core/navigation-link oik_file,Custom Link File Link |
1 / 2 | core/navigation-link oik_class,Custom Link Class Link |
1 / 2 | core/navigation-link oik_hook,Custom Link Hook Link |
1 / 2 | core/navigation-link oik_api,Custom Link API Link |
1 / 2 | core/navigation-link block,Custom Link Block Link |
1 / 2 | core/navigation-link block_example,Custom Link Block example Link |
1 / 2 | core/navigation-link opted_in,Custom Link Opted in page Link |
1 / 2 | core/navigation-link oik_contact,Custom Link Contact Link |
1 / 2 | core/navigation-link oik_testimonials,Custom Link Testimonial Link |
1 / 2 | core/navigation-link oik-themes,Custom Link Theme Link |
1 / 2 | core/navigation-link oik_themeversion,Custom Link oik theme version Link |
1 / 2 | core/navigation-link oik_themiumversion,Custom Link oik themium version Link |
1 / 2 | core/navigation-link oik_todo,Custom Link TODO Link |
1 / 2 | core/navigation-link oik-plugins,Custom Link Plugin Link |
1 / 2 | core/navigation-link oik_pluginversion,Custom Link oik plugin version Link |
1 / 2 | core/navigation-link oik_premiumversion,Custom Link oik premium version Link |
1 / 2 | core/navigation-link download,Custom Link Download Link |
1 / 2 | core/navigation-link oik-faq,Custom Link FAQ Link |
1 / 2 | core/navigation-link letters,Custom Link Letter Link |
1 / 2 | core/navigation-link block_category,Custom Link Block category Link |
1 / 2 | core/navigation-link block_keyword,Custom Link Block keyword Link |
1 / 2 | core/navigation-link block_classification,Custom Link Block classification Link |
1 / 2 | core/navigation-link testimonial_type,Custom Link Testimonial type Link |
1 / 2 | core/navigation-link todo_priority,Custom Link Priority Link |
1 / 2 | core/navigation-link todo_status,Custom Link Status Link |
1 / 2 | core/navigation-link required_version,Custom Link Required version Link |
1 / 2 | core/navigation-link compatible_up_to,Custom Link Compatible up to Link |
1 / 2 | core/navigation-link oik_tags,Custom Link Plugin Tag Link |
1 / 2 | core/navigation-link oik_letters,Custom Link API Letter Link |
1 / 2 | core/navigation-link block_letters,Custom Link Block letter Link |
Update bw_register_post_type() to set the show_in_nav_menus value to false if it's not set.
This requires a change to oik. It's actually the easiest change for CPTs. Does it work for custom taxonomies too?
Does it work for custom taxonomies too?
The same logic is needed in bw_register_custom_tags()
and bw_register_custom_category()
See also bobbingwide/oik-blocks#49