__('Right Sidebar','techozoic'), 'id'=> 'right_sidebar' )); register_sidebar(array( 'name'=>__('Left Sidebar','techozoic'), 'id'=> 'left_sidebar' )); register_sidebar(array( 'name'=>__('Footer - Limit 3 Widgets','techozoic'), 'id'=> 'tech_footer', 'before_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name'=>__('Right Header','techozoic'), 'id'=> 'right_header', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name'=>__('Left Header','techozoic'), 'id'=> 'left_header', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); class Techozoic_Font_Size_Widget extends WP_Widget { function Techozoic_Font_Size_Widget() { $widget_ops = array('classname' => 'techozoic_font_size', 'description' => __( 'Techozoic Font Size Control Widget' , 'techozoic') ); $this->WP_Widget('techozoic_font_size', __('Techozoic Font Size' , 'techozoic'), $widget_ops); } function widget( $args, $instance ) { global $tech; extract($args); $title = apply_filters('widget_title', empty( $instance['title'] ) ? __('Resize Text' , 'techozoic') : $instance['title']); echo $before_widget; echo 'A- | A | A+'; echo $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; $new_instance = wp_parse_args( (array) $new_instance, array( 'title' => '') ); $instance['title'] = strip_tags($new_instance['title']); return $instance; } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); $title = esc_attr( $instance['title'] ); ?>

'techozoic_page', 'description' => __( 'Techozoic Child Page menu displays child pages below current page.' , 'techozoic') ); $this->WP_Widget('techozoic_page', __('Techozoic Child Page' , 'techozoic'), $widget_ops); } function widget( $args, $instance ) { global $tech; extract($args); $title = apply_filters('widget_title', empty( $instance['title'] ) ? __('Sub Pages' , 'techozoic') : $instance['title']); echo $before_widget; global $post; if(is_page()) { if(!$post->post_parent){ $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); } else { if($post->ancestors){ $ancestors = end($post->ancestors); $children = wp_list_pages("title_li=&child_of=".$ancestors."&echo=0"); } } if ($children) { if ( $title) { echo $before_title . $title . $after_title; } echo ""; } } echo $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; $new_instance = wp_parse_args( (array) $new_instance, array( 'title' => '') ); $instance['title'] = strip_tags($new_instance['title']); return $instance; } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array('title' => '',) ); $title = esc_attr( $instance['title'] ); ?>

'techozoic_nav', 'description' => __( 'Techozoic Sidebar Navigation Menu - option to add categories to navigation' , 'techozoic') ); $this->WP_Widget('techozoic_nav', __('Techozoic Navigation' , 'techozoic'), $widget_ops); } function widget( $args, $instance ) { global $tech; extract($args); $title = apply_filters('widget_title', empty( $instance['title'] ) ? __('Navigation' , 'techozoic') : $instance['title']); $c = $instance['cats'] ? '1' : '0'; $p = $instance['pages'] ? '1' : '0'; $s = $instance['separate'] ? '1' : '0'; echo $before_widget; global $post; if ( $title) echo $before_title . $title . $after_title; if (has_nav_menu( 'sidebar' ) ) { wp_nav_menu( array('container' =>'','theme_location'=>'sidebar','menu_class' => 'sidenav')); } else { ?> 0, 'pages' => 1,'separate' => 0, 'title' => '') ); $instance['title'] = strip_tags($new_instance['title']); $instance['cats'] = $new_instance['cats'] ? 1 : 0; $instance['pages'] = $new_instance['pages'] ? 1 : 0; $instance['separate'] = $new_instance['separate'] ? 1 : 0; return $instance; } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array('cats' => 0, 'pages' => 1,'separate' => 0, 'title' => '',) ); $title = esc_attr( $instance['title'] ); $cats = $instance['cats'] ? 'checked="checked"' : ''; $pages = $instance['pages'] ? 'checked="checked"' : ''; $separate = $instance['separate'] ? 'checked="checked"' : ''; ?>

id="get_field_id('pages'); ?>" name="get_field_name('pages'); ?>" />
id="get_field_id('cats'); ?>" name="get_field_name('cats'); ?>" />
id="get_field_id('separate'); ?>" name="get_field_name('separate'); ?>" />


Note if a menu is assigned to Sidebar Navigation Location it is always displayed

'techozoic_about', 'description' => __( 'Author information Widget - Enter short blurb about yourself' ,'techozoic') ); $this->WP_Widget('techozoic_about', __('Techozoic About' ,'techozoic'), $widget_ops); } function widget( $args, $instance ) { extract($args); $title = apply_filters('widget_title', empty( $instance['title'] ) ? __('About Author' ,'techozoic') : $instance['title']); $gravatar = $instance['gravatar'] ? '1' : '0'; $facebook = $instance['facebook'] ? '1' : '0'; $myspace = $instance['myspace'] ? '1' : '0'; $twitter = $instance['twitter'] ? '1' : '0'; $about = $instance['about']; if ( !$number = (int) $instance['number'] ) $number = 50; else if ( $number < 25 ) $number = 25; else if ( $number > 100 ) $number = 100; echo $before_widget; global $post; if ( $title) echo $before_title . $title . $after_title; ?>

'', 'gravatar' => 0, 'title' => '', 'facebook' => 1 , 'myspace' => 1 , 'twitter' => 1, 'number' => 50) ); $instance['about'] = $new_instance['about']; $instance['facebook'] = $new_instance['facebook'] ? 1 : 0; $instance['myspace'] = $new_instance['myspace'] ? 1 : 0; $instance['twitter'] = $new_instance['twitter'] ? 1 : 0; $instance['gravatar'] = $new_instance['gravatar'] ? 1 : 0; $instance['number'] = (int) $new_instance['number']; return $instance; } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array('about' => '', 'gravatar' => 0, 'title' => '', 'facebook' => 1 , 'myspace' => 1 , 'twitter' => 1, 'number'=> 50) ); $title = esc_attr( $instance['title'] ); $about = $instance['about'] ; $facebook = $instance['facebook'] ? 'checked="checked"' : ''; $myspace = $instance['myspace'] ? 'checked="checked"' : ''; $twitter = $instance['twitter'] ? 'checked="checked"' : ''; $gravatar = $instance['gravatar'] ? 'checked="checked"' : ''; $number = isset($instance['number']) ? absint($instance['number']) : 50; ?>


id="get_field_id('facebook'); ?>" name="get_field_name('facebook'); ?>" />
id="get_field_id('myspace'); ?>" name="get_field_name('myspace'); ?>" />
id="get_field_id('twitter'); ?>" name="get_field_name('twitter'); ?>" />
id="get_field_id('gravatar'); ?>" name="get_field_name('gravatar'); ?>" />


'techozoic_meta', 'description' => __( 'Meta Information as well as Dashboard and Log In/Out Links' ,'techozoic') ); $this->WP_Widget('techozoic_meta', __('Techozoic Meta' ,'techozoic'), $widget_ops); } function widget( $args, $instance ) { extract($args); $title = apply_filters('widget_title', empty( $instance['title'] ) ? "" : $instance['title']); echo $before_widget; if ( $title) echo $before_title . $title . $after_title; else { echo $before_title . __('Meta','techozoic') . $after_title; } ?> '') ); return $instance; } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array('title' => '') ); $title = esc_attr( $instance['title'] ); ?>

'techozoic_rss', 'description' => __( 'Link to RSS feed for blog as well as comment RSS feed' ,'techozoic') ); $this->WP_Widget('techozoic_rss', __('Techozoic RSS' ,'techozoic'), $widget_ops); } function widget( $args, $instance ) { extract($args); $title = apply_filters('widget_title', empty( $instance['title'] ) ? "" : $instance['title']); echo $before_widget; if ( $title) echo $before_title . $title . $after_title; else { echo $before_title . __('Syndicate','techozoic') . $after_title; } ?> '') ); return $instance; } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array('title' => '') ); $title = esc_attr( $instance['title'] ); ?>