Skip to content

Instantly share code, notes, and snippets.

@barryhughes
Forked from anonymous/gist:6601352
Created November 28, 2013 15:02
Show Gist options
  • Save barryhughes/7693253 to your computer and use it in GitHub Desktop.
Save barryhughes/7693253 to your computer and use it in GitHub Desktop.
add_filter( 'tribe-events-bar-views', 'setup_listview_in_bar', 1, 1 );
add_filter( 'tribe-events-bar-views', 'setup_gridview_in_bar', 5, 1 );
function setup_listview_in_bar( $views ) {
$views[] = array( 'displaying' => 'upcoming', 'anchor' => 'List View', 'url' => tribe_get_listview_link() );
return $views;
}
function setup_gridview_in_bar( $views ) {
$views[] = array( 'displaying' => 'month', 'anchor' => 'Calendar', 'url' => tribe_get_gridview_link() );
return $views;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment