Support » Plugin: The Events Calendar » [Plugin: The Events Calendar] How to remove TEC capabilities from Database after deleting TEC

  • Resolved gfields108

    (@gfields108)


    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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Rob La Gatta

    (@roblagatta)

    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.

    Plugin Author Rob La Gatta

    (@roblagatta)

    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.

    gfields108

    (@gfields108)

    This worked, thanks!

    Plugin Author Rob La Gatta

    (@roblagatta)

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: The Events Calendar] How to remove TEC capabilities from Database after deleting TEC’ is closed to new replies.