width, get_custom_header()->height, true ); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'chaostheory' ), ) ); /** * Setup the WordPress core custom background feature. */ add_theme_support( 'custom-background', apply_filters( 'chaostheory_custom_background_args', array() ) ); } endif; // chaostheory_setup add_action( 'after_setup_theme', 'chaostheory_setup' ); function chaostheory_widgets_init() { register_sidebars( 2, array( 'before_title' => '

', 'after_title' => '

', ) ); unregister_widget( 'WP_Widget_Search' ); unregister_widget( 'WP_Widget_Links' ); unregister_widget( 'WP_Widget_Meta' ); wp_register_sidebar_widget( 'search', __( 'Search', 'chaostheory' ), 'widget_chaostheory_search' ); wp_register_sidebar_widget( 'meta', __( 'Meta', 'chaostheory' ), 'widget_chaostheory_meta' ); wp_register_sidebar_widget( 'links', __( 'Links', 'chaostheory' ), 'widget_chaostheory_links' ); wp_register_sidebar_widget( 'home-link', __( 'Home Link', 'chaostheory' ), 'widget_sandbox_homelink' ); wp_register_sidebar_widget( 'rss-links', __( 'RSS Links', 'chaostheory' ), 'widget_sandbox_rsslinks' ); } add_action( 'widgets_init', 'chaostheory_widgets_init' ); /** * Enqueue scripts and styles */ function chaostheory_scripts() { wp_enqueue_style( 'chaostheory', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'chaostheory_scripts' ); // Nav fallback function chaostheory_globalnav() { ?>
  • >
    comment_approved == '0' ) : ?>
  • >
    comment_approved == '0' ) _e( 'Your trackback/pingback is awaiting moderation.', 'chaostheory' ); ?>
    tag based on what is being viewed. * * @since ChaosTheory 1.0 */ function chaostheory_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', 'chaostheory' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'chaostheory_wp_title', 10, 2 ); /** * Load custom widgets. */ require_once get_template_directory() . '/inc/widgets.php'; /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.compat.php';