'ffffff', 'border' => 'd1d9dc', 'text' => '516064', 'link' => 'ff8a00', 'url' => 'feb925', ); } /** * Set the content width based on the theme's design and stylesheet. */ if ( ! isset( $content_width ) ) $content_width = 460; /** * Sets up theme defaults and registers support for WordPress features. */ function wu_wei_setup() { // Make theme available for translation load_theme_textdomain( 'wu-wei', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'wu-wei' ), ) ); // Add support for Post Formats add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); /** * Setup the WordPress core custom background feature. */ add_theme_support( 'custom-background' ); add_theme_support( 'custom-header', apply_filters( 'wu_wei_custom_header_args', array( 'default-text-color' => 'd1d9dc', 'width' => 700, 'height' => 144, 'wp-head-callback' => 'header_style', 'admin-head-callback' => 'wuwei_admin_header_style', 'admin-preview-callback' => 'wuwei_admin_header_image', ) ) ); add_theme_support( 'print-style' ); } add_action( 'after_setup_theme', 'wu_wei_setup' ); // Wu Wei has a small post title area so we need to remove the widont filter function wuwei_wido() { remove_filter( 'the_title', 'widont' ); } add_action( 'init', 'wuwei_wido' ); // Add a home link to the default menu fallback wp_page_menu and change the menu class function wuwei_page_menu_args( $args ) { $args['show_home'] = true; $args['menu_class'] = 'menu menu-main'; return $args; } add_filter( 'wp_page_menu_args', 'wuwei_page_menu_args' ); /** * Register widgetized area and update sidebar with default widgets. */ function wu_wei_widgets_init() { // Register sidebar 1 register_sidebar( array ( 'name' => __( 'Footer Left', 'wu-wei' ), 'id' => 'widget-area-1', 'description' => __( 'Widgets in this area will be shown on the left side your blog footer.', 'wu-wei' ), ) ); // Register sidebar 2 register_sidebar( array ( 'name' => __( 'Footer Middle', 'wu-wei' ), 'id' => 'widget-area-2', 'description' => __( 'Widgets in this area will be shown in the middle of your blog footer.', 'wu-wei' ), ) ); // Register sidebar 3 register_sidebar( array ( 'name' => __( 'Footer Right', 'wu-wei' ), 'id' => 'widget-area-3', 'description' => __( 'Widgets in this area will be shown on the right side of your blog footer.', 'wu-wei' ), ) ); } add_action( 'widgets_init', 'wu_wei_widgets_init' ); /** * Enqueue scripts and styles */ function wuwei_scripts() { wp_enqueue_style( 'wu-wei', get_stylesheet_uri() ); $options = get_option( 'wuwei_theme_options' ); if ( isset( $options['colorscheme'] ) && $options['colorscheme'] == 1 ) { wp_enqueue_style( 'colours', get_template_directory_uri() . '/colours.css' ); } if ( is_rtl() ) { wp_enqueue_style( 'colours-rtl', get_template_directory_uri() . '/colours-rtl.css' ); } if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'wuwei_scripts' ); function header_style() { // This function defines the style for the theme // You can change these selectors to match your theme ?>

onclick="return false;" href="">

>
tag based on what is being viewed. * * @since Wu Wei 1.2.4 */ function wuwei_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'wu-wei' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'wuwei_wp_title', 10, 2 ); // Create Theme Options Page require get_template_directory() . '/theme-options.php'; /** * Jetpack support for Wu Wei */ function wu_wei_jetpack_setup() { /** * Add theme support for Infinite Scroll. * See: http://jetpack.me/support/infinite-scroll/ */ add_theme_support( 'infinite-scroll', array( 'footer' => 'content', 'footer_widgets' => array( 'widget-area-1', 'widget-area-2', 'widget-area-3' ) ) ); } add_action( 'after_setup_theme', 'wu_wei_jetpack_setup' );