Comments cnafc started the conversationJanuary 21, 2020 at 4:14pmIs it possible to authorize A USER to publish WITHOUT AUTHORIZATION OF THE ADMINISTRATOR on a calendar? the events proposed by some users of the front would like them to be published automatically without waiting for the administrator's confirmation 877Zhivko repliedJanuary 21, 2020 at 7:45pmHi,It's possible. However, the user will have to refresh the page to see their event.Add this filter in your theme functions.php file: add_filter('stec_insert_post', function($data) { if ($data['post_type'] !== 'stec_event') { return $data; } // SET TRUSTED USERS ID (e.g. 1,2,3,4,...) $trusted_users_ids = [1,2,3,4,5]; if (in_array(get_current_user_id(), $trusted_users_ids)) { $data['meta_input']['approved'] = 1; } return $data;}); Stachethemes Developer Sign in to reply ...
Is it possible to authorize A USER to publish WITHOUT AUTHORIZATION OF THE ADMINISTRATOR on a calendar?
the events proposed by some users of the front would like them to be published automatically without waiting for the administrator's confirmation
Hi,
It's possible. However, the user will have to refresh the page to see their event.
Add this filter in your theme functions.php file:
Stachethemes Developer