__( 'Primary Menu', 'splendio' ), ) ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); add_image_size( 'slider-thumb', 180, 180 ); // This theme allows users to set a custom background. add_theme_support( 'custom-background' ); // This theme allows users to upload a custom header. add_theme_support( 'custom-header', apply_filters( 'splendio_custom_header_args', array( 'width' => 980, 'height' => 174, 'flex-height' => true, 'header-text' => false, ) ) ); // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be the size of the header image that we just defined // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. set_post_thumbnail_size( get_custom_header()->width, get_custom_header()->height, true ); // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'geometric-1' => array( 'url' => '%s/images/headers/geometric-1.jpg', 'thumbnail_url' => '%s/images/headers/geometric-1-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Geometric 1', 'splendio' ) ), 'geometric-2' => array( 'url' => '%s/images/headers/geometric-2.jpg', 'thumbnail_url' => '%s/images/headers/geometric-2-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Geometric 2', 'splendio' ) ), 'geometric-3' => array( 'url' => '%s/images/headers/geometric-3.jpg', 'thumbnail_url' => '%s/images/headers/geometric-3-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Geometric 3', 'splendio' ) ), 'geometric-4' => array( 'url' => '%s/images/headers/geometric-4.jpg', 'thumbnail_url' => '%s/images/headers/geometric-4-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Geometric 4', 'splendio' ) ), 'geometric-5' => array( 'url' => '%s/images/headers/geometric-5.jpg', 'thumbnail_url' => '%s/images/headers/geometric-5-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Geometric 5', 'splendio' ) ), 'path' => array( 'url' => '%s/images/headers/path.jpg', 'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Path', 'splendio' ) ) ) ); // This theme uses Featured Images add_theme_support( 'post-thumbnails' ); } endif; // splendio_setup add_action( 'after_setup_theme', 'splendio_setup' ); /** * Register widgetized area and update sidebar with default widgets * */ function splendio_widgets_init() { // Area 1, located at the top of the sidebar. register_sidebar( array( 'name' => __( 'Sidebar', 'splendio' ), 'id' => 'sidebar-1', 'description' => __( 'The sidebar widget area', 'splendio' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); // Area 2, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'First Footer Widget Area', 'splendio' ), 'id' => 'sidebar-2', 'description' => __( 'The first footer widget area', 'splendio' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Second Footer Widget Area', 'splendio' ), 'id' => 'sidebar-3', 'description' => __( 'The second footer widget area', 'splendio' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Third Footer Widget Area', 'splendio' ), 'id' => 'sidebar-4', 'description' => __( 'The third footer widget area', 'splendio' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Fourth Footer Widget Area', 'splendio' ), 'id' => 'sidebar-5', 'description' => __( 'The fourth footer widget area', 'splendio' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Fifth Footer Widget Area', 'splendio' ), 'id' => 'sidebar-6', 'description' => __( 'The fifth footer widget area', 'splendio' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } /** Register sidebars by running splendio_widgets_init() on the widgets_init hook. */ add_action( 'widgets_init', 'splendio_widgets_init' ); /** * Register Google Fonts style. */ function splendio_register_fonts() { wp_register_style( 'droid-sans', "https://fonts.googleapis.com/css?family=Droid+Sans:regular,bold", array(), '20120821' ); } add_action( 'init', 'splendio_register_fonts' ); /** * Enqueue Google Fonts style. */ function splendio_fonts() { wp_enqueue_style( 'droid-sans' ); } add_action( 'wp_enqueue_scripts', 'splendio_fonts' ); /** * Enqueue scripts and styles */ function splendio_core_scripts() { wp_enqueue_style( 'splendio', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'splendio_core_scripts' ); /** * Load Jetpack compatibility file. */ if ( file_exists( get_template_directory() . '/inc/jetpack.php' ) ) require get_template_directory() . '/inc/jetpack.php';