__( 'Primary Menu', 'thebox' ) ) ); // Enable support for Post Formats add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); } endif; add_action( 'after_setup_theme', 'thebox_setup' ); /** * Enqueue scripts and styles for the front end. * */ function thebox_scripts() { // Add Google Fonts, used in the main stylesheet. wp_enqueue_style( 'thebox-fonts', thebox_fonts_url(), array(), null ); // Add Icons Font, used in the main stylesheet. wp_enqueue_style( 'thebox-icons', get_template_directory_uri() . '/fonts/icons-font.css', array(), '1.4' ); // Loads main stylesheet. wp_enqueue_style( 'thebox-style', get_stylesheet_uri(), array(), '1.3.8' ); wp_enqueue_script( 'thebox-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', 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( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } } add_action( 'wp_enqueue_scripts', 'thebox_scripts' ); /** * Return the Google font stylesheet URL, if available. * * @return string Font stylesheet or empty string if disabled. * */ function thebox_fonts_url() { $fonts_url = ''; /* Translators: If there are characters in your language that are not * supported by the font, translate this to 'off'. Do not translate * into your own language. */ $heading_font = _x( 'on', 'Source Sans Pro font: on or off', 'thebox' ); /* Translators: If there are characters in your language that are not * supported by the font, translate this to 'off'. Do not translate * into your own language. */ $text_font = _x( 'on', 'Oxygen font: on or off', 'thebox' ); if ( 'off' !== $heading_font || 'off' !== $text_font ) { $font_families = array(); if ( 'off' !== $heading_font ) $font_families[] = 'Source Sans Pro:400,700,400italic,700italic'; if ( 'off' !== $text_font ) $font_families[] = 'Oxygen:300,400,700'; $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, "//fonts.googleapis.com/css" ); } return $fonts_url; } /** * Enqueue Google fonts style to admin screen for custom header display. * */ function thebox_admin_fonts() { wp_enqueue_style( 'thebox-admin-fonts', thebox_fonts_url(), array(), null ); } add_action( 'admin_print_scripts-appearance_page_custom-header', 'thebox_admin_fonts' ); /** * Register widgetized area and update sidebar with default widgets * */ function thebox_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar Primary', 'thebox' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '
Upgrade to The Box Plus version to get extended functionality and advanced customization options: %1$s', 'thebox'), sprintf('%s', 'Try The Box Plus') ); ?>