__( 'Primary Menu', 'truly_minimal' ), ) ); /** * Enable support for Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); } endif; // truly_minimal_setup add_action( 'after_setup_theme', 'truly_minimal_setup' ); /** * Setup the WordPress core custom background feature. * * Hooks into the after_setup_theme action. */ function truly_minimal_register_custom_background() { add_theme_support( 'custom-background', apply_filters( 'truly_minimal_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } add_action( 'after_setup_theme', 'truly_minimal_register_custom_background' ); /** * Register widgetized area and update sidebar with default widgets */ function truly_minimal_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'truly_minimal' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'truly_minimal_widgets_init' ); /** * Register Google Fonts */ function truly_minimal_google_fonts() { /* translators: If there are characters in your language that are not supported by Droid Serif, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Droid Serif font: on or off', 'truly-minimal' ) ) { wp_register_style( 'truly-minimal-droid-serif', "https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic" ); } /* translators: If there are characters in your language that are not supported by Droid Sans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Droid Sans font: on or off', 'truly-minimal' ) ) { wp_register_style( 'truly-minimal-droid-sans', "https://fonts.googleapis.com/css?family=Droid+Sans:400,700" ); } } add_action( 'init', 'truly_minimal_google_fonts' ); /** * Enqueue scripts and styles */ function truly_minimal_scripts() { wp_enqueue_style( 'truly-minimal-style', get_stylesheet_uri() ); wp_enqueue_style( 'truly-minimal-droid-serif' ); wp_enqueue_style( 'truly-minimal-droid-sans' ); wp_enqueue_script( 'truly-minimal-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'truly-minimal-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'truly-minimal-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } /* Change table border color to match custom background color if set */ $backgroundcolor = get_theme_mod( 'background_color', 'ffffff' ); if ( 'ffffff' != $backgroundcolor ) { ?>