__( 'Sidebar', 'duotone' ) ) ); add_image_size( 'duotone_archive', 75, 75, true ); add_image_size( 'duotone_singular', 840, 0, true ); register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'duotone' ) ) ); add_theme_support( 'print-style' ); } } add_action( 'after_setup_theme', 'duotone_setup' ); /** * Setup the WordPress core custom background feature. * * Use add_theme_support to register support for WordPress 3.4+ * as well as provide backward compatibility for previous versions. * Use feature detection of wp_get_theme() which was introduced * in WordPress 3.4. * * Hooks into the after_setup_theme action. */ function duotone_custom_background() { $args = array( 'default-color' => '', 'default-image' => '', ); $args = apply_filters( 'duotone_custom_background_args', $args ); add_theme_support( 'custom-background', $args ); } add_action( 'after_setup_theme', 'duotone_custom_background' ); /** * Enqueue scripts and styles */ function duotone_scripts() { wp_enqueue_style( 'duotone', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'duotone_scripts' ); /** * Fallback for primary navigation menu. */ function duotone_page_menu() { $recent = get_posts( array( 'numberposts' => 1, ) ); $year = date( 'Y' ); if ( is_array( $recent ) ) { $last = array_shift( $recent ); if ( isset( $last->post_date ) ) $year = substr( $last->post_date, 0, 4 ); } ?>