__( 'The primary theme sidebar used on all pages.', 'archimedes' ) ) as $k => $v ) { register_sidebar( array( 'id' => 'sidebar-' . sanitize_title( $k ), 'name' => $k, 'description' => $v, 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' ) ); } } /** Setup theme features. * * @uses Archimedes::$dir * @hook after_setup_theme */ public function after_setup_theme() { load_theme_textdomain( 'archimedes', self::$dir . '-/i18n' ); add_editor_style(); add_filter( 'use_default_gallery_style', '__return_false' ); add_filter( 'show_recent_comments_widget_style', '__return_false' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'status', 'quote', 'video' ) ); add_theme_support( 'custom-background', array( 'default-color' => 'e8e8e8', 'wp-head-callback' => '__return_false' ) ); add_theme_support( 'custom-header', array( 'width' => 640, 'height' => 160, 'flex-width' => true, 'flex-height' => true, 'default-text-color' => '333', 'wp-head-callback' => '__return_false', 'admin-head-callback' => array( 'ArchimedesAdmin', 'admin_head' ), 'admin-preview-callback' => array( 'ArchimedesAdmin', 'admin_preview' ) ) ); register_nav_menu( 'primary', __( 'Primary Menu', 'archimedes' ) ); set_post_thumbnail_size( 144, 144 ); } /** Render the portion of the page. * * @uses archimedes_page_description() * @hook wp_head */ public function wp_head() { ?> <?php wp_title( '|' ); ?> '; require_once self::$dir . '-/php/style.php'; echo ''; } } /** Enqueue scripts and stylesheets. * * @uses Archimedes::$url * @uses Archimedes::$preview * @hook wp_enqueue_scripts */ public function wp_enqueue_scripts() { wp_enqueue_style( 'archimedes-theme', add_query_arg( array( 'archimedes_styles' => '' ), home_url( '/' ) ) ); wp_register_script( 'jquery', '', '', '', true); if ( is_singular() and comments_open() and get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( self::$preview ) { wp_enqueue_script( 'archimedes-preview', self::$url . '-/js/admin-preview.js', '', '', true ); } } /** Set the Archimedes::$preview variable. * * @param object $customize WordPress theme customization object. * @uses Archimedes::preview_scripts * @hook customize_register */ public function customize_register( $customize ) { self::$preview = $customize->is_preview(); } } if ( is_admin() ) { // Load and instantiate the administrative class. require_once dirname( __FILE__ ) . '/-/php/admin.php'; new ArchimedesAdmin; } else { // Instantiate the standard class. new Archimedes; }