Execute admin actions on front-end events
-
When a front-end user (role: Subscriber) performs a certain action (click a button, for example), I need a new post to be created. Now I can call wp_insert_post in the page template I’m using but the Subscriber role does not have permission to create a post (in published state). Other than giving the subscriber a higher role, are there any other options?
I was wondering if I can simply invoke an admin action from the page template that will publish a new post. Is there any way to change the user context (to author or up) before calling wp_insert_post? This needs to be done programmatically.
Thanks in advance,
Aj
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Execute admin actions on front-end events’ is closed to new replies.