Oberhauser-Dev / gb-fullcalendar

GB FullCalendar is a branch of the popular WP FullCalendar plugin written as a Gutenberg block.
GNU General Public License v3.0
6 stars 2 forks source link

EM Search Attributes Integration #17

Open marcelolz opened 4 years ago

marcelolz commented 4 years ago

This plugin is very promising. For now, however, I tried to display only the events of the current user with: owner = "USER_ID". But it didn't work. Is this something that you think about dealing with in the future or is there something already in that direction?

Muito obrigado!

Gustl22 commented 4 years ago

I think WP FullCalendar didn't offer this tag, so didn't think of implementing anything like that. You may can explain the use case in more detail. I would also be happy to review a Merge-Request. Sorry for the late response, I'm in vacation right now :)

Gustl22 commented 3 years ago

Hey @marcelolz, I had a deeper look in the issue.

I think you want to make the Search attributes of Events Manager work again in this plugin. Indeed the extra params are not yet transmitted via the fetch / ajax call, which was possible in the former WP FullCalendar plugin. But the most Request params are overwritten unfortunately, which have to be reenabled / rewritten in the wpfc_fullcalendar_args-Hook. So I think, there may can occur security concerns, so we may have to ask the EM developers, why the array is overwritten here.

Related (unanswered) topics: https://wordpress.org/support/topic/shortcode-filter-by-tag/ https://wordpress.org/support/topic/owner-parameter-doesnt-work-on-shortcode/

But I try to update this version, to at least pass the other search parameters written in the shortcode to Events-Manager API.

Gustl22 commented 3 years ago

I fixed part of the issue in c3c7fe493b7b9ec9b7669f36df7b25c3a1f7e8e5. You may want to test this before merging. Note that this only will work if it already worked for WP FullCalendar (e.g. with help of wpfc_fullcalendar_args ).

gb-fullcalendar-17-em-search-attributes-SNAPSHOT.zip