'sidebar','before_widget' => '','after_widget' => '','before_title' => '

','after_title' => '

',)); register_sidebar(array('name'=>'left-footer','before_widget' => '','after_widget' => '','before_title' => '

','after_title' => '

',)); register_sidebar(array('name'=>'right-footer','before_widget' => '','after_widget' => '','before_title' => '

','after_title' => '

',)); register_nav_menus(array('main_nav'=>__('Main','aerin'),'footer_nav'=>__('Footer','aerin'),)); if (is_admin) require_once(get_template_directory() . '/settings.php'); add_action('init', 'aerin_headsetup'); add_action('wp_head', 'aerin_css'); add_action('after_setup_theme', 'aerin_setup'); add_filter('wp_page_menu_args', 'home_page_menu_args'); add_theme_support('post-thumbnails', array('post','page')); add_theme_support('custom-background'); function aerin_headsetup() { $aeringen = aeringen_stored (); if ($aeringen['code']) { add_theme_support('automatic-feed-links'); add_filter('nav_menu_css_class', 'aerin_attributes_filter', 100, 1); add_filter('nav_menu_item_id', 'aerin_attributes_filter', 100, 1); add_filter('page_css_class', 'aerin_attributes_filter', 100, 1); remove_action('wp_head','rsd_link'); remove_action('wp_head','wlwmanifest_link'); remove_action('wp_head','shortlink_wp_head'); remove_action('wp_head','wp_generator'); remove_action('wp_head','wp_shortlink_wp_head', 10, 0 ); remove_action('wp_head','start_post_rel_link', 10, 0 ); remove_action('wp_head','adjacent_posts_rel_link', 10, 0); remove_action('wp_head','parent_post_rel_link', 10, 0 ); remove_action('wp_head','adjacent_posts_rel_link_wp_head', 10, 0 ); remove_action('wp_head','rel_canonical'); } if ($aeringen['location'] == 'analhead') add_action('wp_head','display_analyse',100); if ($aeringen['location'] == 'analfoot') add_action('wp_footer','display_analyse',100); } function aerin_setup() { load_theme_textdomain('aerin', get_template_directory() . '/languages'); if (!isset($content_width)) $content_width = 1060; } function home_page_menu_args($args) { $args['show_home'] = true; return $args; } function aerin_attributes_filter($var) { return is_array($var) ? array_intersect($var, array('current-menu-item')) : ''; } function display_logo() { $aerinlogo = aerinlogo_stored (); if ($aerinlogo['logoresponsive']) $responsive = 'style="max-width: 100%;height:auto"'; if ($aerinlogo['logolink']) {$href = ''; $a ='';} echo ''; } function display_header() { $aerintag = aerintag_stored (); $aeringen = aeringen_stored (); if ($aeringen['headeron']){ $header = wpautop(stripslashes($aerintag['header'])); $content = '
'.$header; if ($aeringen['tagline'] == 'logoright') $content .= 'float:right;">'.$header; if ($aeringen['tagline'] == 'logobelow') $content .= 'clear:left;">'.$header; $content .= '
'; echo $content; } } function display_search() { $aeringen = aeringen_stored(); if ($aeringen['search']) { echo '';} } function display_footer() { $aerintag = aerintag_stored(); $aeringen = aeringen_stored (); if ($aeringen['footeron']){ $footer = wpautop(stripslashes($aerintag['footer'])); echo '
'.$footer.'
';} } function display_error() { $aerinerr = aerinerr_stored(); echo '

'.$aerinerr['errortitle'].'

'; if (!empty ($aerinerr['error'])) echo wpautop(stripslashes($aerinerr['error'])); else echo '

Missing Page

'; } function display_analyse() { $analyse = get_option('aeringen'); echo $analyse['analytics']; } function aerin_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • >
    %s said:','aerin'), get_comment_author_link()) ?> comment_approved == '0') : ?>
    $depth, 'max_depth' => $args['max_depth']))) ?>
    \r\n"; $code .= "#wrapper {border:1px solid black;}\r\n"; $code .= "header,footer,#primary,#secondary {border:1px solid red;}\r\n"; $code .= ".entry,#comments,#navbar,#left-footer,#right-footer,#signoff,#tagline{border:1px solid blue;}\r\n"; $code .= "nav,h1,h2,h3{border:1px solid green;}\r\n"; $code .="\r\n"; echo $code; } } function aeringen_stored () { $aeringen = get_option('aeringen'); if(!is_array($aeringen)) $aeringen = array(); $option_default = aeringen_defaults(); $aeringen = array_merge($option_default, $aeringen); return $aeringen; } function aeringen_defaults () { $aeringen = array(); $aeringen['tagline'] = 'logoleft'; $aeringen['search'] = 'checked'; $aeringen['location'] = 'analhead'; $aeringen['headeron'] = 'checked'; $aeringen['footeron'] = 'checked'; $aeringen['analytics'] = ''; return $aeringen; } function aerinlogo_stored () { $aerinlogo = get_option('aerinlogo'); if(!is_array($aerinlogo)) $aerinlogo = array(); $option_default = aerinlogo_defaults(); $aerinlogo = array_merge($option_default, $aerinlogo); return $aerinlogo; } function aerinlogo_defaults () { $aerinlogo = array(); $aerinlogo['logourl'] = get_template_directory_uri().'/images/logo.gif'; $aerinlogo['logoalt'] = get_option('blogname'); $aerinlogo['logotitle'] = get_option('blogname').' homepage'; $aerinlogo['logolink'] = 'checked'; $aerinlogo['logoresponsive'] = 'checked'; $aerinlogo['logoalternative'] = $aerinlogo['logourl']; return $aerinlogo; } function aerintag_stored () { $aerintag = get_option('aerintag'); if(!is_array($aerintag)) $aerintag = array(); $option_default = aerintag_defaults(); $aerintag = array_merge($option_default, $aerintag); return $aerintag; } function aerintag_defaults () { $aerintag = array(); $aerintag['header'] = 'This is the header tagline. It can go on the left, right or below the logo'; $aerintag['footer'] = 'This is the footer tagline'; return $aerintag; } function aerinerr_stored () { $aerinerr = get_option('aerinerr'); if(!is_array($aerinerr)) $aerinerr = array(); $option_default = aerinerr_defaults(); $aerinerr = array_merge($option_default, $aerinerr); return $aerinerr; } function aerinerr_defaults () { $aerinerr = array(); $aerinerr['errortitle'] = 'Page not found'; $aerinerr['error'] = '

    Hmm. It seems that the page you were looking for has gone missing.

    Many apologies. Try the menu bar or search to see if the page you want is still here.

    '; $aerinerr['location'] = ''; return $aerinerr; }