tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 1568, 9999 ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'menu-1' => __( 'Primary', 'twentynineteen' ), 'footer' => __( 'Footer Menu', 'twentynineteen' ), 'social' => __( 'Social Links Menu', 'twentynineteen' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'script', 'style', 'navigation-widgets', ) ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 190, 'width' => 190, 'flex-width' => false, 'flex-height' => false, ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); // Add support for Block Styles. add_theme_support( 'wp-block-styles' ); // Add support for full and wide align images. add_theme_support( 'align-wide' ); // Add support for editor styles. add_theme_support( 'editor-styles' ); // Enqueue editor styles. add_editor_style( 'style-editor.css' ); // Add custom editor font sizes. add_theme_support( 'editor-font-sizes', array( array( 'name' => __( 'Small', 'twentynineteen' ), 'shortName' => __( 'S', 'twentynineteen' ), 'size' => 19.5, 'slug' => 'small', ), array( 'name' => __( 'Normal', 'twentynineteen' ), 'shortName' => __( 'M', 'twentynineteen' ), 'size' => 22, 'slug' => 'normal', ), array( 'name' => __( 'Large', 'twentynineteen' ), 'shortName' => __( 'L', 'twentynineteen' ), 'size' => 36.5, 'slug' => 'large', ), array( 'name' => __( 'Huge', 'twentynineteen' ), 'shortName' => __( 'XL', 'twentynineteen' ), 'size' => 49.5, 'slug' => 'huge', ), ) ); $default_hue = twentynineteen_get_default_hue(); $saturation = twentynineteen_get_default_saturation(); $lightness = twentynineteen_get_default_lightness(); $lightness_hover = twentynineteen_get_default_lightness_hover(); // Editor color palette. add_theme_support( 'editor-color-palette', array( array( 'name' => 'default' === get_theme_mod( 'primary_color', 'default' ) ? __( 'Blue', 'twentynineteen' ) : null, 'slug' => 'primary', 'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? $default_hue : get_theme_mod( 'primary_color_hue', $default_hue ), $saturation, $lightness ), ), array( 'name' => 'default' === get_theme_mod( 'primary_color', 'default' ) ? __( 'Dark Blue', 'twentynineteen' ) : null, 'slug' => 'secondary', 'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? $default_hue : get_theme_mod( 'primary_color_hue', $default_hue ), $saturation, 23 ), ), array( 'name' => __( 'Dark Gray', 'twentynineteen' ), 'slug' => 'dark-gray', 'color' => '#111', ), array( 'name' => __( 'Light Gray', 'twentynineteen' ), 'slug' => 'light-gray', 'color' => '#767676', ), array( 'name' => __( 'White', 'twentynineteen' ), 'slug' => 'white', 'color' => '#FFF', ), ) ); // Add support for responsive embedded content. add_theme_support( 'responsive-embeds' ); // Add support for custom line height. add_theme_support( 'custom-line-height' ); } endif; add_action( 'after_setup_theme', 'twentynineteen_setup' ); if ( ! function_exists( 'wp_get_list_item_separator' ) ) : /** * Retrieves the list item separator based on the locale. * * Added for backward compatibility to support pre-6.0.0 WordPress versions. * * @since 6.0.0 */ function wp_get_list_item_separator() { /* translators: Used between list items, there is a space after the comma. */ return __( ', ', 'twentynineteen' ); } endif; /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function twentynineteen_widgets_init() { register_sidebar( array( 'name' => __( 'Footer', 'twentynineteen' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your footer.', 'twentynineteen' ), 'before_widget' => '
', 'before_title' => '