Skip to content

Instantly share code, notes, and snippets.

Created September 17, 2013 22:04
Show Gist options
  • Save anonymous/6601352 to your computer and use it in GitHub Desktop.
Save anonymous/6601352 to your computer and use it in GitHub Desktop.
add_filter( 'tribe-events-bar-views', array($this, 'setup_listview_in_bar'), 1, 1 );
add_filter( 'tribe-events-bar-views', array($this, 'setup_gridview_in_bar'), 5, 1 )
</code></pre>
...
<pre><code class="php">
public function setup_listview_in_bar( $views ) {
$views[] = array( 'displaying' =&gt; 'upcoming', 'anchor' =&gt; 'List View', 'url' =&gt; tribe_get_listview_link() );
return $views;
}
public function setup_gridview_in_bar( $views ) {
$views[] = array( 'displaying' =&gt; 'month', 'anchor' =&gt; 'Calendar', 'url' =&gt; tribe_get_gridview_link() );
return $views;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment