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' => '
',
) );
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() {
?>