Home › Forums › Welcome! › Pre-Sales Questions › Making community events POST to an API?
- This topic has 3 replies, 2 voices, and was last updated 9 years, 6 months ago by Barry.
-
AuthorPosts
-
May 30, 2014 at 4:29 am #190177Tom SCLGuest
Hi there,
We have a requirement to have an events list/calendar on a website where the public can add their own events but they are moderated before the appear on the site so we’re looking at your Community Events events plugin.
However another requirement is that when a new event is publish on the site it is also posted to an 3rd party API. We are PHP developers and prepared to write the code to communicate with the API but we would want to do it without hacking the Community Events plugin code. So my question is, does the Community Events plugin provide any event hooks in it’s API which would could used to do this or would this only be possible by hacking the plugin code?
Thanks for your time and I look forward to a reply,
TomMay 30, 2014 at 11:53 am #191493CaseyParticipantTom,
Thanks for getting in touch! Since the Community Submission form just creates a new post (with the status that you designate in your Community settings), then you should be able to use any of the core WordPress hooks to achieve what you are looking to do:* {$new_status}_{$post->post_type} would work as you pointed out – http://adambrown.info/p/wp_hooks/hook/%7B$new_status%7D_%7B$post-%3Epost_type%7D
* wp_insert_post is another – http://adambrown.info/p/wp_hooks/hook/wp_insert_post
* save_post is yet another – http://adambrown.info/p/wp_hooks/hook/save_postHope that helps. Thanks! 🙂
-Casey-
June 3, 2014 at 3:37 am #200639Tom SCLGuestHi Casey,
Thanks for your reply, it sounds like what we need, I’ll have a read through the links you provided to confirm then hopefully will be able to use this approach.Many thanks for your time,
TomOctober 14, 2014 at 7:40 am #810235BarryMemberIt’s been quite a while so I will close this thread: definitely feel free to create new threads if you need any further help 🙂
-
AuthorPosts
- The topic ‘Making community events POST to an API?’ is closed to new replies.