__( 'Primary Menu', 'sela' ), 'social' => __( 'Social Menu', 'sela' ), ) ); add_theme_support( 'post-thumbnails' ); // Post thumbnails set_post_thumbnail_size( 820, 312, true ); // Hero Image on the front page template add_image_size( 'sela-hero-thumbnail', 1180, 610, true ); // Full width and grid page template add_image_size( 'sela-page-thumbnail', 1180, 435, true ); // Grid child page thumbnail add_image_size( 'sela-grid-thumbnail', 360, 242, true ); // Testimonial thumbnail add_image_size( 'sela-testimonial-thumbnail', 90, 90, true ); add_post_type_support( 'page', 'excerpt' ); add_theme_support( 'custom-background', apply_filters( 'sela_custom_background_args', array( 'default-color' => 'fafafa', ) ) ); } add_action( 'after_setup_theme', 'sela_setup' ); /** * Returns the Google font stylesheet URL, if available. */ function sela_fonts_url() { $fonts_url = ''; /* translators: If there are characters in your language that are not supported * by Source Sans Pro, translate this to 'off'. Do not translate into your own language. */ $source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'sela' ); /* translators: If there are characters in your language that are not supported * by Droid Serif, translate this to 'off'. Do not translate into your own language. */ $droid_serif = _x( 'on', 'Droid Serif font: on or off', 'sela' ); /* translators: If there are characters in your language that are not supported * by Oswald, translate this to 'off'. Do not translate into your own language. */ $oswald = _x( 'on', 'Oswald font: on or off', 'sela' ); if ( 'off' !== $source_sans_pro || 'off' !== $droid_serif || 'off' !== $oswald ) { $font_families = array(); if ( 'off' !== $source_sans_pro ) { $font_families[] = 'Source Sans Pro:300,300italic,400,400italic,600'; } if ( 'off' !== $droid_serif ) { $font_families[] = 'Droid Serif:400,400italic'; } if ( 'off' !== $oswald ) { $font_families[] = 'Oswald:300,400'; } $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, "https://fonts.googleapis.com/css" ); } return $fonts_url; } /** * Register widgetized area and update sidebar with default widgets. */ function sela_widgets_init() { register_sidebar( array( 'name' => __( 'Main Sidebar', 'sela' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'First Footer Widget Area', 'sela' ), 'id' => 'sidebar-2', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Second Footer Widget Area', 'sela' ), 'id' => 'sidebar-3', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Third Footer Widget Area', 'sela' ), 'id' => 'sidebar-4', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'First Front Page Widget Area', 'sela' ), 'id' => 'sidebar-5', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Second Front Page Widget Area', 'sela' ), 'id' => 'sidebar-6', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Third Front Page Widget Area', 'sela' ), 'id' => 'sidebar-7', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'sela_widgets_init' ); /** * Enqueue scripts and styles. */ function sela_scripts_styles() { // Add Oswald, Source Sans Pro and Droid Serif fonts. wp_enqueue_style( 'sela-fonts', sela_fonts_url(), array(), null ); // Add Genericons font. wp_enqueue_style( 'genericons', get_template_directory_uri() . '/fonts/genericons.css', array(), '3.4.1' ); // Load the main stylesheet. wp_enqueue_style( 'sela-style', get_stylesheet_uri() ); wp_style_add_data( 'sela-style', 'rtl', true ); wp_enqueue_script( 'sela-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20140813', true ); wp_enqueue_script( 'sela-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20140813', true ); wp_enqueue_script( 'sela-script', get_template_directory_uri() . '/js/sela.js', array( 'jquery' ), '20140813', 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( 'sela-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130922' ); } } add_action( 'wp_enqueue_scripts', 'sela_scripts_styles' ); /** * Enqueue Google fonts style to admin screen for custom header display. */ function sela_enqueue_admin_fonts( $hook ) { if ( 'appearance_page_custom-header' != $hook ) { return; } wp_enqueue_style( 'sela-fonts', sela_fonts_url(), array(), null ); } add_action( 'admin_enqueue_scripts', 'sela_enqueue_admin_fonts' ); /** * Remove Gallery Inline Styling */ add_filter( 'use_default_gallery_style', '__return_false' ); /** * 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'; /** * Custom Header features. */ require get_template_directory() . '/inc/custom-header.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php';