__('Widget Area for left sidebar', 'birdtips'), 'id' => 'widget-area-left', 'description' => __('Widget Area for left sidebar', 'birdtips'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array ( 'name' => __('Widget Area for right sidebar', 'birdtips'), 'id' => 'widget-area-right', 'description' => __('Widget Area for right sidebar', 'birdtips'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } } add_action( 'widgets_init', 'birdtips_widgets_init' ); ////////////////////////////////////////// // SinglePage Comment callback function birdtips_custom_comments( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; ?>
  • id="comment-"> comment_type || 'trackback' == $comment->comment_type): $birstips_url = get_comment_author_url(); $birstips_author = get_comment_author(); ?>
    :
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    comment_approved == '0' ) : ?>

    " conform WORDPRESS } ////////////////////////////////////////////////////// // Pagenation function birdtips_the_pagenation() { global $wp_rewrite; global $wp_query; global $paged; $birdtips_paginate_base = get_pagenum_link(1); if (strpos($birdtips_paginate_base, '?') || ! $wp_rewrite->using_permalinks()) { $birdtips_paginate_format = ''; $birdtips_paginate_base = add_query_arg('paged', '%#%'); } else { $birdtips_paginate_format = (substr($birdtips_paginate_base, -1 ,1) == '/' ? '' : '/') . user_trailingslashit('page/%#%/', 'paged');; $birdtips_paginate_base .= '%_%'; } echo paginate_links( array( 'base' => $birdtips_paginate_base, 'format' => $birdtips_paginate_format, 'total' => $wp_query->max_num_pages, 'mid_size' => 3, 'current' => ($paged ? $paged : 1), )); } ////////////////////////////////////////// // Archive PageTitle function birdtips_the_archivetitle() { if(is_category()) { printf(__('Category Archives: %s', 'birdtips'), single_cat_title('', false)); } elseif( is_tag() ) { printf(__('Tag Archives: %s', 'birdtips'), single_tag_title('', false) ); } elseif (is_day()) { printf(__('Daily Archives: %s', 'birdtips'), get_post_time(get_option('date_format'))); } elseif (is_month()) { printf(__('Monthly Archives: %s', 'birdtips'), get_post_time(__('F, Y', 'birdtips'))); } elseif (is_year()) { printf(__('Yearly Archives: %s', 'birdtips'), get_post_time(__('Y', 'birdtips'))); } elseif (is_author()) { printf(__('Author Archives: %s', 'birdtips'), get_the_author_meta('display_name', get_query_var('author')) ); } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { _e('Blog Archives', 'birdtips'); } } ////////////////////////////////////////////////////// // Date function birdtips_the_date() { $birdtips_html = ''; $birdtips_posted = date(__('M. j, Y', 'birdtips'), strtotime(get_the_time("Y-m-d"))); $birdtips_date = explode(' ', $birdtips_posted); foreach($birdtips_date as $birdtips_d){ $birdtips_html .= '' .$birdtips_d .''; } echo $birdtips_html; } ////////////////////////////////////////////////////// // Header Style function birdtips_header_style() { ?>
    >
    'e6e6e6', ) ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'birdtips' ), ) ); // Add support for custom headers. $custom_header_support = array( 'width' => apply_filters( 'birdtips_header_image_width', 1075 ), 'height' => apply_filters( 'birdtips_header_image_height', 200 ), 'default-image' => '%s/images/headers/green.jpg', 'default-text-color' => 'CCC', 'wp-head-callback' => 'birdtips_header_style', 'admin-head-callback' => 'birdtips_admin_header_style', 'admin-preview-callback' => 'birdtips_admin_header_image' ); add_theme_support( 'custom-header', $custom_header_support ); register_default_headers( array( 'green' => array( 'url' => '%s/images/headers/green.jpg', 'thumbnail_url' => '%s/images/headers/green-thumbnail.jpg', 'description' => 'Green' ), 'blue' => array( 'url' => '%s/images/headers/blue.jpg', 'thumbnail_url' => '%s/images/headers/blue-thumbnail.jpg', 'description' => 'Blue' ), 'yellow' => array( 'url' => '%s/images/headers/yellow.jpg', 'thumbnail_url' => '%s/images/headers/yellow-thumbnail.jpg', 'description' => 'Yellow' ), 'red' => array( 'url' => '%s/images/headers/red.jpg', 'thumbnail_url' => '%s/images/headers/red-thumbnail.jpg', 'description' => 'Red' ), 'white' => array( 'url' => '%s/images/headers/white.jpg', 'thumbnail_url' => '%s/images/headers/white-thumbnail.jpg', 'description' => 'White' ), 'orange' => array( 'url' => '%s/images/headers/orange.jpg', 'thumbnail_url' => '%s/images/headers/orange-thumbnail.jpg', 'description' => 'Orange' ), 'pink' => array( 'url' => '%s/images/headers/pink.jpg', 'thumbnail_url' => '%s/images/headers/pink-thumbnail.jpg', 'description' => 'Pink' ), 'purple' => array( 'url' => '%s/images/headers/purple.jpg', 'thumbnail_url' => '%s/images/headers/purple-thumbnail.jpg', 'description' => 'Purple' ), ) ); } add_action( 'after_setup_theme', 'birdtips_setup' ); ////////////////////////////////////////////////////// // Document Title function birdtips_title( $title ) { global $page, $paged; $title .= get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " | $site_description"; if ( $paged >= 2 || $page >= 2 ) $title .= ' | ' . sprintf( __( 'Page %s', 'birdtips' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'birdtips_title' ); ////////////////////////////////////////////////////// // Enqueue Acripts function birdtips_scripts() { if ( is_singular() && comments_open() && get_option('thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } wp_enqueue_script('jquery'); wp_enqueue_script( 'birdtips', get_template_directory_uri() .'/js/birdtips.js', 'jquery', '1.05' ); wp_enqueue_style( 'birdtips', get_stylesheet_uri() ); wp_enqueue_style( 'genericons', get_template_directory_uri() .'/genericons/genericons.css'); } add_action( 'wp_enqueue_scripts', 'birdtips_scripts' ); ////////////////////////////////////////////////////// // Excerpt More function birdtips_excerpt_more() { global $post; return ' ' . __( '»more', 'birdtips') .''; } add_filter('excerpt_more', 'birdtips_excerpt_more'); ////////////////////////////////////////////////////// // Theme Customizer function birdtips_customize($wp_customize) { $wp_customize->add_section( 'birdtips_customize', array( 'title'=> __( 'Theme Options', 'birdsite' ), 'priority' => 999, ) ); // Text Color $wp_customize->add_setting( 'birdtips_text_color', array( 'default' => '#555', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'birdtips_text_color', array( 'label' => __( 'Text Color', 'birdsite' ), 'section'=> 'birdtips_customize', 'settings' => 'birdtips_text_color', ) ) ); // Link Color $wp_customize->add_setting( 'birdtips_link_color', array( 'default' => '#06A', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'birdtips_link_color', array( 'label' => __( 'Link Color', 'birdsite' ), 'section'=> 'birdtips_customize', 'settings' => 'birdtips_link_color', ) ) ); // Aticle Titler Color $wp_customize->add_setting( 'birdtips_article_title_color', array( 'default' => '#dd6633', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'birdtips_article_title_color', array( 'label' => __( 'Article Title Color', 'birdsite' ), 'section'=> 'birdtips_customize', 'settings' => 'birdtips_article_title_color', ) ) ); // Navigation Text Color $wp_customize->add_setting( 'birdtips_navigation_color', array( 'default' => '#CCC', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'birdtips_navigation_color', array( 'label' => __( 'Navigation Text Color', 'birdsite' ), 'section'=> 'birdtips_customize', 'settings' => 'birdtips_navigation_color', ) ) ); } add_action('customize_register', 'birdtips_customize');