Advanced Customization

Event Geek uses several actions and filters to make customization possible without altering the core plugin files. Below is a list of filter and action hooks developers can use to modify Event Geek for their own needs.

Event Geek Filters

  • gg_ajax_close_image
  • gg_before_clicked_date, gg_after_clicked_date
  • gg_before_event_title, gg_after_event_title
  • gg_before_event_category_title, gg_event_category_title, gg_after_event_category_title
  • gg_before_event_dates, gg_after_event_dates
  • gg_before_event_start_date, gg_after_event_start_date, gg_before_event_end_date, gg_after_event_end_date
  • gg_shortcode_begin, gg_shortcode_end
  • gg_event_arrow_up, gg_event_arrow_down
  • gg_event_widget_date_args
  • gg_event_ajax_loader
  • gg_events_slug
  • gg_events_public
  • gg_events_archive
  • gg_event_supports
  • gg_events_menu_icon
  • gg_admin_ui_theme
  • gg_event_meta_names
  • gg_event_taxonomy_args
  • gg_event_language_options

Actions

  • gg_event_ajax
  • gg_event_geek_ajax_header, gg_event_geek_ajax_footer
  • gg_event_meta_inputs
  • gg_failed_nonce
  • gg_failed_permissions
  • gg_save_events_meta
  • gg_start_event_listing
  • gg_before_event_content, gg_after_event_content
  • gg_start_event_widget, gg_end_event_widget

Examples

To use a different image for the “x” that closes the ajax pop_up, you can use the gg_ajax_close_image filter by using something like this in your theme’s functions.php file:

<?php
function my_event_geek_closer(){
     $image = get_stylesheet_directory_uri() . '/images/my_close.png';
     return $image;
}
add_filters('gg_ajax_close_image', 'my_event_geek_closer');
?>

Or maybe you want to change the way the dates appear in the calendar. To do this you could use the gg_event_language_options filter:

<?php
function my_custom_event_language_options($languageoptions){

    $languageoptions['monthNames'] = array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
    $languageoptions['dayNamesMin'] = array("Sun", "Mon","Tue","Wed","Thu","Fri","Sat");

    return $languageoptions;
}

add_filter('gg_event_language_options', 'my_custom_event_language_options');
?>

For more about filters, actions and hooks: