__('Main Menu', 'sunrain'), 'top-menu' => __('Top Menu', 'sunrain') ) ); load_theme_textdomain( 'sunrain', get_template_directory() . '/languages' ); // Set the content width based on the theme's design and stylesheet. global $content_width; if ( ! isset( $content_width ) ) $content_width = 584; add_theme_support( 'title-tag' ); // Tell WordPress for the Feed Link add_editor_style(); add_theme_support( 'automatic-feed-links' ); // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150, true ); // default Post Thumbnail dimensions (cropped) // additional image sizes // delete the next line if you do not need additional image sizes add_image_size( 'category-thumb', 300, 9999 ); //300 pixels wide (and unlimited height) // WordPress 3.4 Custom Background Support $sunrain_custom_background = array( 'default-color' => 'ffffff', 'default-image' => get_template_directory_uri() . '/images/back1.png', ); add_theme_support( 'custom-background', $sunrain_custom_background ); // WordPress 3.4 Custom Header Support $sunrain_custom_header = array( 'default-image' => '', 'random-default' => false, 'width' => 300, 'height' => 90, 'flex-height' => false, 'flex-width' => false, 'default-text-color' => '000000', 'header-text' => false, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $sunrain_custom_header ); } add_action( 'after_setup_theme', 'sunrain_setup' ); // Functions for adding script function sunrain_enqueue_scripts() { wp_enqueue_style('sunrain-style', get_stylesheet_uri(), false ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } wp_enqueue_script( 'sunrain-menu-style', get_template_directory_uri(). '/js/menu.js', array( 'jquery' ) ); wp_enqueue_script( 'sunrain-html5', get_template_directory_uri().'/js/html5.js'); wp_script_add_data( 'sunrain-html5', 'conditional', 'lt IE 9' ); wp_register_style('sunrain-gfonts1', '//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800', false ); wp_enqueue_style('sunrain-gfonts1'); if (is_front_page()): wp_enqueue_script( 'sunrain-main-slider', get_template_directory_uri() . '/js/jquery.fractionslider.min.js', array( 'jquery' ) ); wp_enqueue_style('sunrain-main-slider-css', get_template_directory_uri(). '/css/fractionslider.css' ); endif; if ( sunrain_get_option('responsive', '0') == '1' ) : wp_enqueue_style('sunrain-responsive', get_template_directory_uri(). '/style-responsive.css' ); endif; } add_action( 'wp_enqueue_scripts', 'sunrain_enqueue_scripts' ); // Functions for adding script to Admin Area function sunrain_admin_style() { wp_enqueue_style( 'sunrain_admin_css', get_template_directory_uri() . '/inc/admin-style.css', false ); } add_action( 'admin_enqueue_scripts', 'sunrain_admin_style' ); // Functions for adding some custom code within the head tag of site function sunrain_custom_code() { ?> ID) . '" class="read-more">'.__('Read More', 'sunrain').' >'; } add_filter('excerpt_more', 'sunrain_excerpt_more'); // Content Type Showing function sunrain_content() { if (( sunrain_get_option('contype', '1') != '2' ) || is_page() || is_single() ) : the_content(''.__('Read More', 'sunrain').' >'); else: the_excerpt(); endif; } function sunrain_creditline() { echo '| SunRain Theme by: D5 Creation | Powered by: WordPress'; } // Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link function sunrain_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'sunrain_page_menu_args' ); // Post Date design function sunrain_post_date() { echo '
' . get_the_time('M') . ' ' . get_the_time('d') . ' ' . get_the_time('Y') . '
'; } // Post Meta design function sunrain_post_meta() { ?>
' , ', '); ?>
__('Primary Sidebar','sunrain'), 'id' => 'sidebar-1', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

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

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Area One','sunrain'), 'id' => 'sidebar-3', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Area Two','sunrain'), 'id' => 'sidebar-4', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Area Three','sunrain'), 'id' => 'sidebar-5', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Area Four','sunrain'), 'id' => 'sidebar-6', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'sunrain_widgets_init' ); add_filter('the_title', 'sunrain_title'); function sunrain_title($title) { if ( '' == $title ) { return '(Untitled)'; } else { return $title; } }