'eff1f5', 'text' => '444444', 'link' => 'ff7200', 'border' => 'c3c9d5', 'url' => '444444', ); } if ( ! function_exists( 'shaan_setup' ) ) { /** * Setup Shaan. */ function shaan_setup() { load_theme_textdomain( 'shaan', get_template_directory() . '/languages' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 100, 100, true ); add_image_size( 'shaan_featured_image', 600, 250, true ); add_theme_support( 'custom-header', apply_filters( 'shaan_custom_header_args', array( 'default-image' => '', 'default-text-color' => 'fff', 'width' => 950, 'height' => 100, 'wp-head-callback' => 'shaan_header_style', 'admin-head-callback' => 'shaan_admin_header_style', ) ) ); add_theme_support( 'custom-background' ); register_nav_menus( array( 'primary-menu' => __( 'Header Navigation', 'shaan' ), 'footer-menu' => __( 'Footer Navigation', 'shaan' ), ) ); add_action( 'widgets_init', 'shaan_register_sidebar' ); add_filter( 'excerpt_length', 'shaan_excerpt_length' ); add_filter( 'excerpt_more', 'shaan_auto_excerpt_more' ); add_action( 'comment_form_before_fields', 'shaan_comment_form_before_fields' ); add_action( 'comment_form_after_fields', 'shaan_comment_form_after_fields' ); add_theme_support( 'print-style' ); } } add_action( 'after_setup_theme', 'shaan_setup' ); /** * Register Google fonts style. * * @since Shaan 1.1.8-wpcom */ function shaan_register_fonts() { wp_register_style( 'shaan_font_molengo', "https://fonts.googleapis.com/css?family=Molengo", array(), '20120821' ); } add_action( 'init', 'shaan_register_fonts' ); /** * Google Font. * * Hooks into the 'wp_enqueue_scripts' filter. * * @access private * @since Shaan 1.1.8-wpcom */ function shaan_enqueue_color_style() { _deprecated_function( __FUNCTION__, '1.2', 'shaan_scripts()' ); wp_enqueue_script( 'shaan_font_molengo' ); } /** * Enqueue Google fonts style to admin screen for custom header display * * @since Shaan 1.1.8-wpcom */ function shaan_admin_fonts( $hook_suffix ) { if ( 'appearance_page_custom-header' != $hook_suffix ) return; wp_enqueue_style( 'shaan_font_molengo' ); } add_action( 'admin_enqueue_scripts', 'shaan_admin_fonts' ); /** * Comment Reply Script. * * Hooks into the 'wp_enqueue_scripts' filter. * * @access private * @since Shaan 1.1.8-wpcom */ function shaan_comment_reply_script() { _deprecated_function( __FUNCTION__, '1.2', 'shaan_scripts()' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } /** * Enqueue scripts and styles */ function shaan_scripts() { wp_enqueue_style( 'shaan_font_molengo' ); wp_enqueue_style( 'shaan', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'shaan_scripts' ); if ( ! function_exists( 'shaan_header_style' ) ) { function shaan_header_style() { $image = get_header_image(); $text_color = get_header_textcolor(); $description = get_bloginfo( 'description' ); if ( empty( $image ) && ! empty( $description ) && $text_color == HEADER_TEXTCOLOR ) return; ?> __( 'Sidebar', 'shaan' ), 'id' => 'sidebar-1', 'description' => __( 'The sidebar widget area.', 'shaan' ), 'before_widget' => '
', 'before_title' => '