esc_html__( 'Primary', 'peak-publishing' ), 'menu-2' => esc_html__( 'Footer', 'peak-publishing' ), ) ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); $bg_args = apply_filters( 'peak_publishing_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ); add_theme_support( 'custom-background', $bg_args ); add_theme_support( 'customize-selective-refresh-widgets' ); $logo_args = array( 'height' => 64, 'width' => 200, 'flex-width' => true, 'flex-height' => false, ); add_theme_support( 'custom-logo', $logo_args ); } endif; add_action( 'after_setup_theme', 'peak_publishing_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function peak_publishing_content_width() { $GLOBALS['content_width'] = apply_filters( 'peak_publishing_content_width', 1172 ); } add_action( 'after_setup_theme', 'peak_publishing_content_width', 0 ); /** * Adjust the sticky nav position if the admin bar is showing. * * @package Peak_Publishing */ function peak_publishing_admin_bar_adjust() { if ( is_admin_bar_showing() ) : ?> esc_html__( 'Article', 'peak-publishing' ), 'id' => 'single', 'description' => esc_html__( 'Sidebar displayed on single posts & pages.', 'peak-publishing' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Homepage Featured Content Area', 'peak-publishing' ), 'id' => 'homepage', 'description' => esc_html__( 'The homepage featured content area', 'peak-publishing' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Taxonomy Featured Content Area', 'peak-publishing' ), 'id' => 'taxonomy', 'description' => esc_html__( 'The taxonomies featured content area', 'peak-publishing' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'peak_publishing_widgets_init' ); /** * Enqueue scripts and styles. */ function peak_publishing_scripts() { wp_enqueue_style( 'peak-publishing-style-reset', get_stylesheet_uri(), array(), PEAK_PUBLISHING_VERSION ); wp_enqueue_style( 'peak-publishing-style', get_stylesheet_directory_uri() . '/css/peak-publishing.css', array(), PEAK_PUBLISHING_VERSION ); wp_enqueue_script( 'peak-publishing-navigation', get_template_directory_uri() . '/js/navigation.js', array(), PEAK_PUBLISHING_VERSION, true ); wp_enqueue_script( 'peak-publishing-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), PEAK_PUBLISHING_VERSION, true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'peak_publishing_scripts' ); /** * Use ellipses for the excerpt more. * * @param string $more The excerpt more. * @return string */ function peak_publishing_excerpt_more( $more ) { return ' …'; } add_filter( 'excerpt_more', 'peak_publishing_excerpt_more' ); require get_template_directory() . '/inc/widgets.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require get_template_directory() . '/inc/template-functions.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; }