Events+ update over wrote customization code

I had a customization set up so when someone registers for the event I can hover the mouse over the event and the persons name will appear (only the persons registered not those who have registered and then un registered)

The developer told me this today:

I'm afraid again you have to post to WPMU DEV support forum. From our finding we need a hook in 'set_event_info' method defined in 'Class Eab_CalendarTable_EventArchiveCalenda

  • Preston

    I was told that I needed post the code so here it is:

    class Eab_CalendarTable_EventArchiveCalendar
    public function get_event_attendees($event_id) { //Added function
    global $wpdb;
    $attendeesUserArray = '';
    $table = $wpdb->prefix.'eab_bookings';
    $sql = "SELECT user_id FROM $table WHERE event_id like '$event_id' AND (status like 'yes' OR status like 'maybe')";
    $attendees = $wpdb->get_results($sql);

    foreach($attendees as $attendant) {
    $user = get_userdata($attendant->user_id);
    $url = defined('BP_VERSION')
    ? bp_core_get_user_domain($attendant->user_id) :
    if($user->last_name != '') {
    $name = $user->first_name.' '.$user->last_name;
    } else {
    $name = $user->user_login;
    $avatar = get_avatar($attendant->user_id, 20);
    $attendeesUserArray .= '<span class="attendant">
    <span class="user-icon">'.get_avatar($attendant->user_id, 40).'</span>
    <span class="user-name">'.$name.'</span>
    return $attendeesUserArray;

    public function set_event_info ($event_tstamps, $current_tstamps, $event_info) {
    $css_classes = $event_info['status_class'];
    $event_permalink = !empty($event_info['blog_id'])
    ? get_blog_permalink($event_info['blog_id'], $event_info['id'])
    : get_permalink($event_info['id'])
    $tstamp = esc_attr(date_i18n("Y-m-d\TH:i:sO", $current_tstamps['start']));
    $daytime = (int)date("His", $event_tstamps['start']);

    if (!empty($event_info['has_no_start_time'])) {
    $datetime_format = get_option('date_format');
    $datetime_class = 'eab-date_format-date';
    $event_datetime_start = $current_tstamps['start'];
    } else {
    $datetime_format = get_option('time_format');
    $datetime_class = 'eab-date_format-time';
    $event_datetime_start = $event_tstamps['start'];


    $this->_data[$daytime][] = '' .
    $event_info['title'] .
    '<span class="wpmudevevents-calendar-event-info">' .
    !empty($this->_thumbnail['with_thumbnail']) && !empty($event_info['thumbnail'])
    ? $event_info['thumbnail']
    : ''
    ) .
    '<time datetime="' . $tstamp . '">' .
    '<var class="' . sanitize_html_class($datetime_class) . '">' . apply_filters('eab-calendar-event_archive-start_time', date_i18n($datetime_format, $event_datetime_start), $event_datetime_start, $event_info['id']) . '</var>' .
    '</time> ' .
    $event_info['event_venue'] .
    (!empty($this->_excerpt['show_excerpt']) ? ' <span class="eab-calendar-event_excerpt">' . esc_html($event_info['excerpt']) . '</span>' : '') .
    '<span class="attendees">'. //custom added section START
    '</span>'. //custom added section END
    '</span>' .

  • Panos

    Hello @info1622,

    As Nastia has already mentioned in her reply, developers response times take longer than usual support. Also I would like to note that this request exceeds the purpose of our support as it falls in the custom works field. However I would like to try and help you out here if I can.

    I might have not understood exactly what you need, so I made a plugin for you that lists the attendees at the admin page of each event. It's in a different plugin so that it will not get overwritten with the next update.

    Hopefully it meets your requirements!

    Kind regards,

  • Preston


    the developer finally got back with me on this. Here is his reply:

    Hi Preston, The code will not work. I think they do not understand our requirement. We want that hovering for front end use. Kindly forward them the attached png and brief our requirement once again.

    Also tell them this calendar is served from Eab_CalendarTable_EventArchiveCalendar Class and we want a hook or option so that we can add attendees list in set_event_info function of this class.


  • Panos

    Hello @info1622,
    Hope you are doing well today :slight_smile:

    As already mentioned this request exceeds the purpose of our support as it falls in the custom works field since it requires additional PHP and JS code to be added in a feature that the plugin was not designed for.

    I would recommend to post a new thread in the Features & Feedback forum describing what you need. Keep in mind that the most likes it gets the most likely it is to be added in a next version.

    You can always post this job at the Jobs & Pros section where you can hire one of the community members. In such case you should request this feature to be provided in a separate plugin so it doesn't get overriden with the next update of Events + plugin.

    Take care and have a nice day!

    Kind regards,

  • Preston


    I just forwarded your message to the developer.

    Just to make sure we are on the same page. yes it was some custom work but the last events+ update over wrote the coding resulting in the custom work being erased. We are trying to figure out why that happened and any "hooks" or whatever needs to be done so this doesnt happen again. - we are not asking for you WPMU DEV to do the custom coding only why this custom coding that I paid this developer to do was erased upon the last events+ update

  • Panos

    Hey there Preston,

    This is unfortunate :slight_frown:

    Several website owners have had similar experience to this. A general rule is to try and keep customizations separate from original theme or plugin files as when they update, all their files are being replaced by the new ones. For themes it is as simple as using child-themes, but for plugins it is a bit harder and in some cases impossible.

    Even if you have kept a backup of your previous Events+ plugin I would recommend to redo this work with a different approach. I would recommend to create a new plugin that will offer a new shortcode eg
    which will replicate shortcode

    only that you will need to add js which would probably load on hover and display the list of attendees.

    This way you have the basic functionality kept in the original plugin and your additional functionality in a separate plugin that extends the original by using it's functions. So in case of an update you will not loose your custom work!

    Hope this helps!

    Kind regards,

  • Panos

    Hello Preston ,

    Glad he managed to fix you issue :slight_smile:

    If your developer has modified plugin files to make your customization, then when you update the plugin, all changes will be lost, as when you update a plugin all of its files are being replaced with new ones, which do not contain your customizations.

    If you want to check if these changes will be lost then do the following:
    1. In your localohost (or somewhere on your server) install a new WordPress site. Use default theme Twenty Sixteen

    2. Download the plugin from your current site and upload it (or if in localhost paste it) in your new testing site wp-content/plugins folder.

    3. Check how it works. Normally it should not contain any customization, it should only provide what original plugin provides. If you see your customizations it means that they will be overridden with next plugin update.

    4. If you do not see your customizations the next thing to do is to download your theme (and child theme) and install them to your new testing site. If your developer made his changes through the theme's functions.php file then you should be able to see the customization. These will be lost if you do not use child theme and update your original theme.

    5. If you still don't see any of the customization it means that your developer has probably added them through a custom plugin. This means that you do not loose you customizations with plugin or theme update.

    6. Finally, just to be sure, go to your testing site's plugins folder and replace the plugin you installed (the one you downloaded from your site) with our original plugin and you can see if these changes get lost.

    In any case it is considered good practise to have a testing site similar to the original one, and make your plugins and theme updates before doing them to your production site. It is also a good practise to keep backups before any updates/changes.

    You can use our Snapshot plugin to keep your backups easily.

    Hope this helped!

    Kind regards,