Support

Home Forums Event Espresso Premium Multiple Authors for an Event Post

Multiple Authors for an Event Post

Posted: January 30, 2019 at 12:20 am

Viewing 2 reply threads


ARAGATO

January 30, 2019 at 12:20 am

In WordPress Standard you can assign one author to a post/event which is then the owner of this post. When a user has the capability ee_read_private_events he then only sees his events where he is the author.

So far so good.

However, I need multiple authors for a post. So I added a plugin called Co-Authors Plus, which let’s you add multiple authors to a post (https://wordpress.org/plugins/co-authors-plus/).
It looks like this:
http://uploads.aragato-server.net/screenshots/20190130af01d93684.png

The issue now is, that the capability does not let authors except the first one see its event.

Example:
I have an event cinema to which I assigned
user1
user2
in that particular order.
Both users have the capability ee_read_private_events which lets them only see the events they are the author of. user1 sees only his event cinema in the event list. user2 does not see any event.

I therefor assume that EE looks just takes THE first author of a post/event and checks it capabilities.

My question now: Is there a hook in order to change the functionality to able to use multiple authors.

Thanks.


Tony

  • Support Staff

January 30, 2019 at 1:20 pm

Hi there,

In WordPress Standard you can assign one author to a post/event which is then the owner of this post. When a user has the capability ee_read_private_events he then only sees his events where he is the author.

This is incorrect.

ee_read_private_events determines if the current user can view events thats are privately published, not if they can view other users events, that would be ee_read_others_events (but that means the user can view all others events).

The issue now is, that the capability does not let authors except the first one see its event.

That’s because, within the database, the author is still set as the first. The plugin you are using doesn’t update the author field on the post, for example, here’s an event I’ve set multiple authors on: https://monosnap.com/file/T8h6hfLygsDTonSd1gcCO9GW6MPVyY

Then in the database, just the one author: https://monosnap.com/file/2mfyzmIvTNNlZX3GZJPLjc25VtwBxW

I don’t know how that plugin is adding multiple authors, but it’s not using the post_author field to do it.

Both users have the capability ee_read_private_events which lets them only see the events they are the author of. user1 sees only his event cinema in the event list. user2 does not see any event.

Again, that’s not ee_read_private_events, its because they don’t have the ee_read_others_events capability

I therefor assume that EE looks just takes THE first author of a post/event and checks it capabilities.

That’s correct, it does, but even if it didn’t the above plugin adds the authors in an different way, so pulling those authors would be unique to that pluign.

My question now: Is there a hook in order to change the functionality to able to use multiple authors.

You’ll need to do that in multiple locations, for the event list its:

FHEE__Events_Admin_Page__get_events__where

Which is a filter on the WHERE params for the query, but with the way the above plugin works I’m not sure how you would pull the additional authors in to be included in the query.


ARAGATO

February 7, 2019 at 2:32 am

Thanks Tony. It looks like I might end up developing my own front end list for those users. I actually do not want to give them back-end access anyway just to view the registration list.

Viewing 2 reply threads

The support post ‘Multiple Authors for an Event Post’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso