Viewing 14 replies - 91 through 104 (of 104 total)
  • Garrett Hyder

    (@garrett-eclipse)

    @ctrlaltdelete, you can accomplish this in a similar way as the article for CPT UI by using the cptui_pre_register_taxonomy filter. In your filter function check for your taxonomy and then update the $args to add capabilities as noted in your link.
    Hope that helps.
    Cheers

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    @ctrlaltdelete as a quick example following what Garrett mentions:

    function ctrlaltdelete_custom_roles( $args, $taxonomy_name ) {
    	if ( $taxonomy_name === 'my_taxonomy' ) {
    		$args['capabilities']['edit_terms']   = 'ctrlaltdel';
    		$args['capabilities']['manage_terms'] = 'ctrlaltdel';
    	}
    
    	return $args;
    }
    add_filter( 'cptui_pre_register_taxonomy', 'ctrlaltdelete_custom_roles', 10, 2 );
    

    It doesn’t matter what you assign into the indexes, just something invalid for a capability type.

    ctrlaltdelete

    (@ctrlaltdelete)

    Oh thanks guys, and can i also check for Admin first so only the admin can add terms too? Would it be alright?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    You can do whatever you want to the taxonomy arguments with this filter. We know we’re kind of “weak” on the capabilities customization via UI for post types and taxonomies, but with this we provide one last chance to amend via code, without ditching CPTUI completely.

    ctrlaltdelete

    (@ctrlaltdelete)

    Cool, won’t lie i thought about just using code and ditching the plugin but i won’t cos i’m lazy and you are quick and nice to people. Keep it up!

    thequasar

    (@thequasar)

    Like many, I’m trying to prepare for the gutenberg apocalypse, and when I tried out the new editor today, I wasn’t able to display my custom taxonomies.

    I believe it is because gutenberg uses blocks rather than metaboxes on the sidemenu? I tried to manually add the metabox into the main editor, that displayed the metabox, but it wasn’t functional (wasn’t able to add any terms to the post).

    add_meta_box('tagsdiv-myCustomBox','myCustomBox', 'post_tags_meta_box', 'post', 'normal', 'high', array( 'taxonomy' => 'myCustomBox' ));

    Unless I’m missing something, I’d like to request block support to display our custom taxonomies on the sidemenu.

    • This reply was modified 6 years ago by thequasar.
    • This reply was modified 6 years ago by thequasar.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    @thequasar, I wonder if this part of the 1.6.0 release is what’s missing for you: https://github.com/WebDevStudios/custom-post-type-ui/issues/724

    Specifically setting the “show in rest” to true for gutenberg support, for the given post type.

    Beyond that, I’m not presently aware of what other conditions need to be met manually, for Gutenberg support, but if there are other steps needed, we can definitely look into helping. Other than that, I think it should all be handled by Gutenberg/Core.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Update: looks like the taxonomy/taxonomies need “show in rest” support as well.

    thequasar

    (@thequasar)

    @tw2113

    Thanks man! That indeed fixed it!

    Since Toolset Types is going to stop as a free solution, it would be nice if it is possible to import CTP’s, taxonomies and custom fields from Toolset Types to Custom Post Type UI. Thanks

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    @wzshop This one right? With their 3.0 release from the looks of things? https://www.ads-software.com/plugins/types/

    Hey @tw2113,
    Its that plugin yes, for the current free version: 2.3.4.
    The 3.0 release is the paid version, the reason that I would like to switch;)

    • This reply was modified 5 years, 11 months ago by wzshop.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Correct, 2.3.4 would be what gets migrated away from, because it’s going to only receive bug/compatibility fixes as necessary for a temporary amount of time, while 3.0.0 of their plugin is the premium one that people may not want to upgrade to.

    Just making sure I have the correct plugin as a whole in mind. We’re reviewing things and have it as an enhancement issue on our GitHub repo.

    Ok thanks(Y)

Viewing 14 replies - 91 through 104 (of 104 total)
  • The topic ‘Feature requests’ is closed to new replies.