WP FullCalendar Owner
-
Love the look and integration of WP FullCalendar with Events Manager.
And furthermore, the integration that Events Manager has with BuddyPress. Really great stuff.
I’m kind of shocked, though, that WP FullCalendar does not accept the owner attribute.
This is essential for the site I’m building, as each BuddyPress user is supposed to get their own Calendar on their own page.I came across this support thread over a year ago: https://ww.wp.xz.cn/support/topic/fullcalendar-and-owner/
which has this function:function my_em_custom_code_wpfc($args) { $user_ID = get_current_user_id(); $args['owner'] = $user_ID; // the user id return $args; } add_filter('wpfc_fullcalendar_args','my_em_custom_code_wpfc',10,1);This is close, but it’s still incredibly limiting.
What I’m trying to do is get
$user_IDbased off the post/page Authors User ID.And I could normally do this, right, with something like
$user_ID = get_post_field( 'post_author', $post_ID );But my issue is that this function seems to run before the WordPress loop is initialized, so I’m unable to get details such as the Post ID.
This is confusing, as looking through the code at instances for
wpfc_fullcalendar_args: https://github.com/wp-plugins/wp-fullcalendar/blob/master/wp-fullcalendar.php#L172
: https://github.com/wp-plugins/wp-fullcalendar/blob/master/wp-fullcalendar.php#L243It seems to initialize
global $post, but I’m still unable to get any result when using the function.Does the plug-in author have any support for this? Being able to specify an
ownerattribute seems an obvious feature to have (especially would be great in a shortcode), but is there any work around for me to be able to specify a dynamic owner until maybe this feature is added down the line?Thanks.
The topic ‘WP FullCalendar Owner’ is closed to new replies.