As you’re probably aware by now(!), I’m trying to integrate BuddyBlog with the Events Manager plugin which stores some additional data in its own wp_em_events table.
I’ve noticed that if a user submits a post for immediate publication, a record automatically gets added to the wp_em_events table (as it should) HOWEVER… if a user submits a post requiring approval, no entry is added to the wp_em_events table (until that that post is approved).
I guess I can programmatically add an entry (using the bblpro_post_submitted hook) but in that case, will presumably need to somehow check the status of the post first since otherwise there’s a risk of creating a duplicate entry (since an entry will automatically be created if the post is published).
Of course, I’m not expecting you to resolve all my issues with Events Manager(!) but it would be interesting/helpful to understand how BuddyBlog is handling a post once it is submitted (depending on whether its status is published or pending approval) which presumably then triggers whether or not an entry is made in the wp_em_events able (or not).
Hope that makes some sense and with many thanks in advance for any thoughts.
BuddyBlog sets the post status to either of the three statuses ‘draft’, ‘publish’, ‘pending’ depending on
1. If a user saves post as draft, the post status is saved as ‘draft’
2. If the site admin has forced that the post must be submitted for approval, on post submission, status is set to ‘pending’
3. If the site admin has allowed publishing on submission, on submission the status is set to ‘publish’.
My suggestion will be to check if the data is present for post being submitted in the events table, if not, you may want to add that.
Hope that helps.
Thank you for getting back to me. I realise I’m actually not at all sure how/why an entry EVER gets created in the wp_em_events table when posting a BuddyBlog post anyway(!) but your suggestion of simply checking if an extra exists and creating it if it doesn’t, does sound like the safest option 😉
Fingers crossed and many thanks again.
You must be logged in to reply to this topic.