{"id":1632769,"date":"2018-09-27T17:02:42","date_gmt":"2018-09-28T00:02:42","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/"},"modified":"2018-09-27T17:02:42","modified_gmt":"2018-09-28T00:02:42","slug":"disabling-editing-of-event-categories","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/","title":{"rendered":"Disabling Editing of Event Categories"},"content":{"rendered":"<p>I wanted to be able to do this and I mean across this old post: <a href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-editing-of-event-categories\/\">https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-editing-of-event-categories\/<\/a><\/p>\n<p>While the answer is a good one a concern I had was by overriding the entire Tribe Events <code>register_taxonomy<\/code> call it could cause issues with future updates. Below is my modified solution which reads the original parameters and then just overrides the <code>capabilities<\/code> section and then re-registers the taxonomy. Thought it might be helpful to others in the future.<\/p>\n<pre><code>function bdc_tribe_events_cat() {\n\n    \/\/only needed in admin\n    if( !is_admin() )\n    {\n        return;\n    }\n\n    \/\/ get the arguments of the already-registered taxonomy\n    $events_category_args = get_taxonomy( &#039;tribe_events_cat&#039; ); \/\/ returns an object\n\n    $new_permissions = array(\n        &#039;manage_terms&#039;. =&gt; &#039;update_themes&#039;,\n        &#039;edit_terms&#039;.        =&gt; &#039;update_themes&#039;,\n        &#039;delete_terms&#039;.    =&gt; &#039;update_themes&#039;,\n        &#039;assign_terms&#039;.    =&gt; &#039;update_themes&#039;\n    );\n\n    $events_category_args-&gt;cap = $new_permissions;\n\n    register_taxonomy( &#039;tribe_events_cat&#039;, &#039;tribe_events&#039;, (array) $events_category_args);\n}\n\n\/\/only admins can edit event categories\nadd_action( &#039;init&#039;, &#039;bdc_tribe_events_cat&#039;, 11 );<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-1632769","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Disabling Editing of Event Categories -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disabling Editing of Event Categories -\" \/>\n<meta property=\"og:description\" content=\"I wanted to be able to do this and I mean across this old post: https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-editing-of-event-categories\/ While the answer is a good one a concern I had was by overriding the entire Tribe Events register_taxonomy call it could cause issues with future updates. Below is my modified solution which reads the original parameters and then [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/\",\"name\":\"Disabling Editing of Event Categories -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-09-28T00:02:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Disabling Editing of Event Categories\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Disabling Editing of Event Categories -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/","og_locale":"en_US","og_type":"article","og_title":"Disabling Editing of Event Categories -","og_description":"I wanted to be able to do this and I mean across this old post: https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-editing-of-event-categories\/ While the answer is a good one a concern I had was by overriding the entire Tribe Events register_taxonomy call it could cause issues with future updates. Below is my modified solution which reads the original parameters and then [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/","name":"Disabling Editing of Event Categories -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-09-28T00:02:42+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disabling-editing-of-event-categories\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Disabling Editing of Event Categories"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1632769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1632769\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1632769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}