Tribe__Events__Capabilities::set_initial_caps( boolean $force = false )
Set the initial capabilities for events and related post types on default roles
Contents
Parameters
- $force
-
(boolean) (Optional) Force the registering of new caps without checking any flags.
Default value: false
Return
(void)
Source
File: src/Tribe/Capabilities.php
public function set_initial_caps() { // this is a flag for testing purposes to make sure this function is firing $this->set_initial_caps = true; foreach ( array( 'administrator', 'editor', 'author', 'contributor', 'subscriber' ) as $role ) { $this->register_post_type_caps( Tribe__Events__Main::POSTTYPE, $role ); $this->register_post_type_caps( Tribe__Events__Main::VENUE_POST_TYPE, $role ); $this->register_post_type_caps( Tribe__Events__Main::ORGANIZER_POST_TYPE, $role ); $this->register_post_type_caps( Tribe__Events__Aggregator__Records::$post_type, $role ); } }
Changelog
Version | Description |
---|---|
5.1.1 | Introduced. |