shawfactor / lh-user-taxonomies

This is a WordPress plugin that extends the default taxonomy functionality to users
10 stars 11 forks source link

Not working after last wordpress update? #10

Closed halvardos closed 7 years ago

halvardos commented 7 years ago

After upgrading to the current version of wordpress 4.7 registering a taxonomy does not seem to work any more.

Current code does not produce any errors, but the taxonomy is note registered, can't be seen int backend, etc.

add_action('set_current_user', function () {
    write_log('registering taxonomies');
    register_taxonomy('team', 'user', array(
        'public'            => true,
        'single_value'      => true,
        'show_admin_column' => true,
        'labels'            => array(
            'name'                      =>'Teams',
            'singular_name'             =>'Team',
            'menu_name'                 =>'Teams',
            'search_items'              =>'Search teams',
            'popular_items'             =>'Popular teams',
            'all_items'                 =>'All teams',
            'edit_item'                 =>'Edit team',
            'update_item'               =>'Update Team',
            'add_new_item'              =>'Add New Team',
            'new_item_name'             =>'New Team Name',
            'add_or_remove_items'       =>'Add or remove teams',
            'choose_from_most_used'     =>'Choose from the most popular teams',
        ),
        'capabilities'      => array(
            'manage_terms'              =>'edit_users',
            'edit_terms'                =>'edit_users',
            'delete_terms'              =>'edit_users',
            'assign_terms'              =>'edit_users',
        ),
    ));
}, 10);
halvardos commented 7 years ago

Nope, I'm just dumb