Genesis Simple Sidebars/Simple Menus support for Events Manager plugin

  • Download Gist
wpp-events-manager-genesis-simple-support.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<?php
/*
Plugin Name: wpPERFORM.com Events Manager Genesis Simple Support
Description: Provides support for sidebars created with Genesis Simple Sidebars and menus created with Genesis Simple Menus for the Events Manager plugin
Version: 0.2
License: GPL
Author: The wpPERFORM.com Team
Author URI: http://wpperform.com
*/
 
// replaces supports for events CPT
function wpp_events_sidebar() {
$wpp_events_sidebar = array('custom-fields','title','editor','excerpt','comments','thumbnail','author','genesis-simple-sidebars','genesis-simple-menus');
return $wpp_events_sidebar;
}
 
// replaces supports for location CPT
function wpp_events_location_sidebar() {
$wpp_events_location_sidebar = array('title','editor','excerpt','custom-fields','comments','thumbnail','author','genesis-simple-sidebars','genesis-simple-menus');
return $wpp_events_location_sidebar;
}
 
// check if events function exists
if( function_exists( 'wp_events_plugin_init' ) ) {
 
// adds genesis simple sidebars and menus to regular events
// if recurring events are enabled, this filter adds genesis simple sidebars to them too
add_filter( 'em_cp_event_supports','wpp_events_sidebar' );
 
// adds genesis simple sidebars and menus to locations if locations are enabled
if( get_option('dbem_locations_enabled', true) ) {
add_filter( 'em_cp_location_supports','wpp_events_location_sidebar' );
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.