protected function view_switcher($current_mode)
    {
        $modes = array(
            'list'    => __('List View'),
            'excerpt' => __('Excerpt View')
        );

?>
        <input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />
        <div class="view-switch">
<?php
            foreach ( $modes as $mode => $title ) {
                $class = ( $current_mode == $mode ) ? 'class="current"' : '';
                echo "<a href='" . esc_url( add_query_arg( 'mode', $mode, $_SERVER['REQUEST_URI'] ) ) . "' $class><img id='view-switch-$mode' src='" . esc_url( includes_url( 'images/blank.gif' ) ) . "' width='20' height='20' title='$title' alt='$title' /></a>\n";
            }
        ?>
        </div>
<?php
    }