Please set up menu in Appearance...Menus - see documentation.'; } // widgets if ( function_exists('register_sidebar') ){ register_sidebar(array('name'=>'Sidebar')); register_sidebar(array('name'=>'Sidebar-Left')); register_sidebar(array('name'=>'Sidebar-Right')); register_sidebar(array('name'=>'Sidebar-Contact')); register_sidebar(array('name'=>'Footer A')); register_sidebar(array('name'=>'Footer B')); register_sidebar(array('name'=>'Footer C')); register_sidebar(array('name'=>'Footer D')); } function blogBox_styles() { wp_register_style( 'main_style',get_template_directory_uri() . '/style.css',array(),'20120527','all' ); wp_register_style( 'feature_slider_style',get_template_directory_uri() . '/css/feature_slider.css',array(),'20120527','all' ); wp_register_style( 'superfish_style',get_template_directory_uri() . '/css/superfish.css',array(),'20120527','all' ); // enqueing: wp_enqueue_style( 'main_style' ); wp_enqueue_style( 'feature_slider_style' ); wp_enqueue_style( 'superfish_style' ); } add_action('wp_print_styles', 'blogBox_styles'); /* * --------------------HTML Validation Filters ------------------------ */ /*the rel tag does not validate it says it does not like the term category * Discussion at wordpess.org suggests it is an HTML/W#C issue.Browsers do * not use this attribute in any way. However, search engines can use this * attribute to get more information about a link. */ function html5_fix_the_category($content) { global $post; //$rel = 'rel="tag"'; $pattern = '/rel="category tag"/'; $replacement = 'rel="tag"'; $content = preg_replace($pattern, $replacement, $content); return $content; } add_filter('the_category','html5_fix_the_category'); /* * Plugin Name: Shortcode Empty Paragraph Fix * Plugin URI: http://www.johannheyne.de/wordpress/shortcode-empty-paragraph-fix/ * Description: Fix issues when shortcodes are embedded in a block of content that is filtered by wpautop. * Author URI: http://www.johannheyne.de * Version: 0.1 * Put this in /wp-content/plugins/ of your Wordpress installation */ function shortcode_paragraph_insertion_fix($content) { $array = array ( '

[' => '[', ']

' => ']', ']
' => ']', ']
' => ']' ); $content = strtr($content, $array); return $content; } add_filter('the_content', 'shortcode_paragraph_insertion_fix'); add_theme_support('automatic-feed-links'); add_theme_support('post-thumbnails'); add_image_size('wide_thumbnail',200,133); /** * Collects our theme options * * @return array */ function blogBox_get_global_options(){ global $bB_option_standards; $blogBox_option = array(); // collect option names as declared in blogBox_get_settings() $blogBox_option_names = array ( 'blogBox_options_general', 'blogBox_options_skins', 'blogBox_options_background_colors', 'blogBox_options_text_colors', 'blogBox_options_fonts', 'blogBox_options_home', 'blogBox_options_portfolios' ); // loop for get_option foreach ($blogBox_option_names as $blogBox_option_name) { if (get_option($blogBox_option_name)!= FALSE) { $option = get_option($blogBox_option_name); // now merge in main $blogBox_option array! $blogBox_option = array_merge($blogBox_option, $option); } } blogBox_options_standards(); foreach ($bB_option_standards as $key => $value) { //echo $key[$value]; if (!isset($blogBox_option[$key]) || $blogBox_option[$key] === "") { $blogBox_option[$key] = $value; //echo $key; } } return $blogBox_option; } class hermit_walker extends Walker_Nav_Menu /*custom walker that only shows the menuitem's ID's (and active items get active classes), delevering clean menu code (in WordPress > 3.0) */ { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $current_indicators = array('current-menu-item', 'current-menu-parent', 'current_page_item', 'current_page_parent'); $newClasses = array(); foreach($classes as $el){ //check if it's indicating the current page, otherwise we don't need the class if (in_array($el, $current_indicators)){ array_push($newClasses, $el); } } $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $newClasses), $item ) ); if($class_names!='') $class_names = ' class="'. esc_attr( $class_names ) . '"'; $output .= $indent . '