WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] How to remove TEC capabilities from Database after deleting TEC (5 posts)

  1. gfields108
    Member
    Posted 2 years ago #

    I am going in another direction for calendar functionality and deleted The Events Calendar. However when using the Members plugin to create a new user role I see that the following user capabilities have been left behind by the plugin:
    delete_tribe_event
    delete_tribe_organizer
    delete_tribe_venue

    edit_others_tribe_events
    edit_others_tribe_organizers
    edit_others_tribe_venues
    edit_tribe_event
    edit_tribe_events
    edit_tribe_organizer
    edit_tribe_organizers
    edit_tribe_venue
    edit_tribe_venues

    publish_tribe_events
    publish_tribe_organizers

    read_private_tribe_events
    read_private_tribe_organizers
    read_private_tribe_venues
    read_tribe_event
    read_tribe_venue

    How do I remove these?

    Thanks,
    Greg

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hey Greg. Bummer to hear you moved a different route on the calendar front. Not sure of the answer here myself, but let me see if one of the devs for this plugin can share a suggestion directly when they hit the forums here later this week.

  3. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hi again Greg. I spoke to our dev team on this, and we've got something that should work for you. Adding this to your functions.php should clean up your install (though you only needs to run it once, then you can remove the code):

    $role = get_role( 'administrator' );
    $role->remove_cap( 'edit_tribe_event' );
    $role->remove_cap( 'read_tribe_event' );
    $role->remove_cap( 'delete_tribe_event' );
    $role->remove_cap( 'edit_tribe_events' );
    $role->remove_cap( 'edit_others_tribe_events' );
    $role->remove_cap( 'publish_tribe_events' );
    $role->remove_cap( 'read_private_tribe_events' );

    $role->remove_cap( 'edit_tribe_venue' );
    $role->remove_cap( 'read_tribe_venue' );
    $role->remove_cap( 'delete_tribe_venue' );
    $role->remove_cap( 'edit_tribe_venues' );
    $role->remove_cap( 'edit_others_tribe_venues' );
    $role->remove_cap( 'publish_tribe_venues' );
    $role->remove_cap( 'read_private_tribe_venues' );

    $role->remove_cap( 'edit_tribe_organizer' );
    $role->remove_cap( 'read_tribe_organizer' );
    $role->remove_cap( 'delete_tribe_organizer' );
    $role->remove_cap( 'edit_tribe_organizers' );
    $role->remove_cap( 'edit_others_tribe_organizers' );
    $role->remove_cap( 'publish_tribe_organizers' );
    $role->remove_cap( 'read_private_tribe_organizers' );

    Let us know if this does the trick.

  4. gfields108
    Member
    Posted 2 years ago #

    This worked, thanks!

  5. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Awesome to hear! Thanks for confirming, Greg. Let us know what else we can do down the road.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic