Log1x / poet

Configuration-based post type, taxonomy, block category, and block registration for Sage 10.
https://github.com/Log1x/poet
MIT License
205 stars 16 forks source link

Unable to modify default 'category' taxonomy #42

Open iniznet opened 2 years ago

iniznet commented 2 years ago

Similar to the #36 issue, this also happening to WordPress default taxonomy.

ErrorException:
Attempt to read property "menu_name" on array
File: wp/wp-admin/menu.php
Line: 179

Poet:

'category' => [
    'links' => ['series', 'series-queue', 'chapter'], // This also doesn't work, unable to link CPT
    'meta_box' => 'radio',
    'labels' => [
        'singular' => 'Series',
        'plural' => 'Series',
    ],
],

Removing the default taxonomy is work fine, though.

slackday commented 9 months ago

Add "menu_name" key to 'labels' array and define it as 'labels' => (object)[ ... ] to convert from object to array. It's not pretty but it works as a fix.