remove_action ('wp_head', 'wp_generator'); // Path constants define('THEMELIB', TEMPLATEPATH . '/library'); define('THEMELIB_URI', get_template_directory_uri() . '/library'); // Load common functions require_once(THEMELIB . '/common.php'); // Load thickbox require_once(THEMELIB . '/thickbox.php'); // Load accordian menu require_once(THEMELIB . '/accordian.php'); if (!function_exists('theme_sidebars')) : function theme_sidebars() { register_sidebar(array( 'name'=> 'Blackcurrant Sidebar', 'id' => 'sidebar', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '', 'after_title' => '', )); } endif; add_action( 'widgets_init', 'theme_sidebars' ); // add custom menu support if ( function_exists( 'register_nav_menu' ) && !function_exists( 'register_theme_menus' )) : function register_theme_menus() { register_nav_menu( 'toptabs', __( 'Top Tabs', 'purplepastels' ) ); register_nav_menu( 'main', __( 'Main Sidebar', 'purplepastels' ) ); register_nav_menu( 'archive', __( 'Archives', 'purplepastels' ) ); } endif; add_action( 'init', 'register_theme_menus' ); // Custom post excerpt if( !function_exists ('theme_custom_excerpt') ) : function theme_custom_excerpt($length) { return 100; } endif; add_filter('excerpt_length', 'theme_custom_excerpt'); if( !function_exists( 'theme_customisations' ) ) : function theme_customisations() { define ('BACKGROUND_COLOR', '624755'); define ('BACKGROUND_IMAGE', ''); define('HEADER_IMAGE_WIDTH', 1000 ); define('HEADER_IMAGE_HEIGHT', 100 ); define('HEADER_IMAGE', get_bloginfo('stylesheet_directory') . '/images/header.jpg'); define('HEADER_TEXTCOLOR', 'F487D0'); } endif; add_action( 'after_setup_theme', 'theme_customisations' ); // Style header customisation in the Admin area if ( !function_exists( 'theme_admin_header_style' ) ) : function theme_admin_header_style() { ?> '."\n"; if( get_header_image() != '' ) echo '#header {background:#3F152B url(' . get_header_image() . ') right top no-repeat;}'; else echo '#header {background-image:none;}'; if( get_header_textcolor() == 'blank' ) echo '#header h1 {position:absolute;top:-9000px;left:-9000px;}'; else echo '#header h1 a,#header h1 small {color:#' . get_header_textcolor() . ';}'; echo "\n\n\n"; } endif; add_custom_image_header('theme_custom_header_style', 'theme_admin_header_style'); // Amend comment form fields if ( !function_exists( 'theme_comment_fields' ) ) : function theme_comment_fields($fields) { $commenter = wp_get_current_commenter(); $req = get_option('require_name_email'); if( $req ) $reqd = '' . __('*', 'blackcurrant') . ''; $fields['author'] = '

    '; $fields['email'] = '

    ' . '

    '; $fields['url'] = '

    ' . '

    '; return $fields; } endif; add_filter('comment_form_default_fields','theme_comment_fields'); // Amend comment form arguments if ( ! function_exists( 'theme_comment_form_args' ) ) : function theme_comment_form_args($user_identity, $post_id, $req) { $args = array( 'comment_notes_before' => '

    ', 'logged_in_as' => '

    ' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ), 'comment_notes_after' => '

    ', 'comment_field' => '

    ', 'label_submit'=>'Submit Reply' ); return $args; } endif;