__( 'Primary Menu', 'alexandria' ), ) ); /** * Enable support for Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); /** * Setup the WordPress core custom background feature. */ if ( of_get_option('skin_style') && of_get_option('skin_style') !== 'child' ) { $custombgargsskin = of_get_option('skin_style'); }else { $custombgargsskin = 'alexandria'; } if ( get_stylesheet_directory() == get_template_directory() ) { $custombgargs = array( 'default-color' => 'ebeef1', 'default-image' => get_template_directory_uri() . '/skins/images/'.$custombgargsskin.'/page_bg.png', ); }else { $custombgargs = array( 'default-image' => get_stylesheet_directory_uri() . '/images/page_bg.png', ); } add_theme_support( 'custom-background', $custombgargs ); add_editor_style(); /** * Enable support for Title tag */ add_theme_support( 'title-tag' ); } endif; // alexandria_setup add_action( 'after_setup_theme', 'alexandria_setup' ); if ( ! function_exists( '_wp_render_title_tag' ) ) : function alexandria_render_title() { ?> <?php wp_title( '|', true, 'right' ); ?> __( 'Sidebar', 'alexandria' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Left Sidebar', 'alexandria' ), 'id' => 'footer-left', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); if( !of_get_option('footer_layout') || of_get_option('footer_layout') == 'one' ) { register_sidebar( array( 'name' => __( 'Footer Center Sidebar', 'alexandria' ), 'id' => 'footer-center', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } register_sidebar( array( 'name' => __( 'Footer Right Sidebar', 'alexandria' ), 'id' => 'footer-right', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } endif; // alexandria_widgets_init add_action( 'widgets_init', 'alexandria_widgets_init' ); if ( ! function_exists( 'alexandria_scripts' ) ) : /** * Enqueue scripts and styles */ function alexandria_scripts() { if ( get_stylesheet_directory() != get_template_directory() ) { wp_enqueue_style( 'alexandria-parent-style', get_template_directory_uri().'/style.css' ); } wp_enqueue_style( 'alexandria-style', get_stylesheet_uri() ); if( (of_get_option('skin_style') != 'child' && of_get_option('skin_style') != 'alexandria') ) { wp_enqueue_style( 'alexandria-skin-style', get_template_directory_uri().'/skins/'.of_get_option('skin_style').'.css' ); } global $wp_styles; $wp_styles->add('alexandria_ie9', get_template_directory_uri().'/fixed.css'); $wp_styles->add_data('alexandria_ie9', 'conditional', 'lt IE 9'); $wp_styles->add('alexandria_ie8', get_template_directory_uri().'/ie.css'); $wp_styles->add_data('alexandria_ie8', 'conditional', 'lt IE 8'); $wp_styles->enqueue(array('alexandria_ie9', 'alexandria_ie8')); wp_enqueue_script( 'alexandria-tinynav', get_template_directory_uri() . '/js/tinynav.min.js', array('jquery'), false, false ); wp_enqueue_script( 'alexandria-general', get_template_directory_uri() . '/js/general.js', array(), false, true ); wp_localize_script( 'alexandria-general', 'alexandria_tinynav_header', array( 'header' => __('Menu', 'alexandria' ) ) ); wp_enqueue_script( 'alexandria-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'alexandria-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } } endif; // alexandria_scripts add_action( 'wp_enqueue_scripts', 'alexandria_scripts' ); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; if ( ! function_exists( 'alexandria_backupmenu' ) ) : /** * Backup menu incase menu isn't set. */ function alexandria_backupmenu() { if ( current_user_can('edit_theme_options') ) { echo ' '; } else { echo ' '; } } endif; // alexandria_backupmenu