You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since WordPress 5.8, a variation of the core/navigation-link block is registered in the server for each Custom Post Type and Taxonomy where the show_in_nav_menus attribute is true.
For CPTs registered using bw_register_post_type(), many of these variations were indistiguishable in the block editor. In blocks.wp-a2z.org I had 16 variations of "Post Link".
This is because the strings being used to generate the variation name and description were not defined in the post type's / taxonomy's labels array.
bobbingwide/oik#183 addresses the problem for post types registered using bw_register_post_type(), but doesn't cater for CPTs and taxonomies that have been created / updated using oik-types.
Requirement
Ensure core/navigation-link variations for CPTs and taxonomies are identifiable.
Support oik-types definitions created prior to WordPress 5.8
Solution
For CPTs which are modified by oik-types merge the labels produced by bw_register_post_type() with those that have been saved in the bw_types option.
For CPTs created by oik-types unset the saved $args['labels'] and use the values produced by bw_register_post_type().
At this point in time it doesn't seem necessary to remove the old labels from the bw_types option.
The text was updated successfully, but these errors were encountered:
Since WordPress 5.8, a variation of the
core/navigation-link
block is registered in the server for each Custom Post Type and Taxonomy where theshow_in_nav_menus
attribute is true.For CPTs registered using
bw_register_post_type()
, many of these variations were indistiguishable in the block editor. In blocks.wp-a2z.org I had 16 variations of "Post Link".For more information, and a screenshot, see bobbingwide/oik-blocks#49
This is because the strings being used to generate the variation name and description were not defined in the post type's / taxonomy's labels array.
bobbingwide/oik#183 addresses the problem for post types registered using
bw_register_post_type()
, but doesn't cater for CPTs and taxonomies that have been created / updated using oik-types.Requirement
core/navigation-link
variations for CPTs and taxonomies are identifiable.Solution
bw_register_post_type()
with those that have been saved in thebw_types
option.$args['labels']
and use the values produced bybw_register_post_type()
.At this point in time it doesn't seem necessary to remove the old
labels
from thebw_types
option.The text was updated successfully, but these errors were encountered: