__( 'Primary Menu', 'ari' ), ) ); /** * This theme allows users to set a custom background. */ add_theme_support( 'custom-background' ); } endif; // ari_setup add_action( 'after_setup_theme', 'ari_setup' ); /** * Register widgetized area and update sidebar with default widgets * * @since Ari 1.1.2 */ function ari_widgets_init() { register_sidebar( array( 'name' => __( 'Primary Sidebar', 'ari' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Secondary Sidebar', 'ari' ), 'id' => 'sidebar-2', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'ari_widgets_init' ); /** * Enqueue scripts and styles */ function ari_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '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', 'ari_scripts' ); /** * Enqueue font styles. */ function ari_fonts() { wp_enqueue_style( 'ari-droid-sans', "https://fonts.googleapis.com/css?family=Droid+Sans:400,700" ); wp_enqueue_style( 'ari-droid-serif', "https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic" ); } add_action( 'wp_enqueue_scripts', 'ari_fonts' ); /** * Enqueue font style for the custom header admin page. */ function ari_admin_fonts( $hook_suffix ) { if ( 'appearance_page_custom-header' != $hook_suffix ) return; wp_enqueue_style( 'ari-droid-sans', "https://fonts.googleapis.com/css?family=Droid+Sans:400,700" ); wp_enqueue_style( 'ari-droid-serif', "https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic" ); } add_action( 'admin_enqueue_scripts', 'ari_admin_fonts' ); /** * Background wrapper style for front-end when a custom background image is set */ function ari_custom_background() { $options = ari_get_theme_options(); // Don't do anything if there is nothing for background image and background color. if ( '' == get_background_image() && '' == get_background_color() ) : return; // Background image is set but no background color, then use default background color for each color scheme elseif ( '' != get_background_image() && '' == get_background_color() ) : if ( 'dark' == $options['color_scheme'] ) : $background_color = '1b1c1b'; else : $background_color = 'ffffff'; endif; // If both background image and background color are set let's use the background color else : $background_color = get_background_color(); endif; ?>