Tribe__Events__Community__Tickets__Main::user_has_edit_tribe_events_cap( array $all_caps, array $caps )
Alter the edit_tribe_events
cap if the request comes during an AJAX ticket save/update/remove operation on an event auto-draft.
Contents
Even if the option that allows users that submitted Community Events to edit their events later is off users submitting the first draft of an event should still be able to create, update and remove tickets from the event draft.
Parameters
- $all_caps
-
(array) (Required) User capabilities.
- $caps
-
(array) (Required) Caps being checked.
Return
(array)
Source
File: src/Tribe/Main.php
public function user_has_edit_tribe_events_cap( $all_caps, $caps ) { if ( empty( $caps[0] ) || 'edit_tribe_events' !== $caps[0] ) { return $all_caps; } if ( Tribe__Main::instance()->doing_ajax() && $this->editing_ticket_on_own_autodraft() ) { $all_caps['edit_tribe_events'] = true; } return $all_caps; }