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', 'varia' ), 'menu-2' => __( 'Footer Menu', 'varia' ), 'social' => __( 'Social Links Menu', 'varia' ), ) ); /* * 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', ) ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 96, 'width' => 100, 'flex-width' => true, 'flex-height' => true, 'header-text' => array( 'site-title', 'site-description' ), ) ); // 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_editor_style( 'child-theme-alt-style.css' ); // this will get loaded in a child theme // Add custom editor font sizes. add_theme_support( 'editor-font-sizes', array( array( 'name' => __( 'Small', 'varia' ), 'shortName' => __( 'S', 'varia' ), 'size' => 15, 'slug' => 'small', ), array( 'name' => __( 'Normal', 'varia' ), 'shortName' => __( 'M', 'varia' ), 'size' => 18, 'slug' => 'normal', ), array( 'name' => __( 'Large', 'varia' ), 'shortName' => __( 'L', 'varia' ), 'size' => 25.92, 'slug' => 'large', ), array( 'name' => __( 'Huge', 'varia' ), 'shortName' => __( 'XL', 'varia' ), 'size' => 31.105, 'slug' => 'huge', ), ) ); /* * Get customizer colors and add them to the editor color palettes * * - if the customizer color is empty, use the default */ $colors_array = get_theme_mod( 'colors_manager' ); // color annotations array() $primary = ! empty( $colors_array ) ? $colors_array['colors']['link'] : '#FF0000'; // $config-global--color-primary-default; $secondary = ! empty( $colors_array ) ? $colors_array['colors']['fg1'] : '#FFFFFF'; // $config-global--color-secondary-default; $foreground = ! empty( $colors_array ) ? $colors_array['colors']['txt'] : '#444444'; // $config-global--color-foreground-default; $background = ! empty( $colors_array ) ? $colors_array['colors']['bg'] : '#0000FF'; // $config-global--color-background-default; // Editor color palette. add_theme_support( 'editor-color-palette', array( array( 'name' => __( 'Primary', 'varia' ), 'slug' => 'primary', 'color' => $primary, ), array( 'name' => __( 'Secondary', 'varia' ), 'slug' => 'secondary', 'color' => $secondary, ), array( 'name' => __( 'Foreground', 'varia' ), 'slug' => 'foreground', 'color' => $foreground, ), array( 'name' => __( 'Background', 'varia' ), 'slug' => 'background', 'color' => $background, ), ) ); // Add support for responsive embedded content. add_theme_support( 'responsive-embeds' ); // Add support for Global Styles. add_theme_support( 'jetpack-global-styles', [ 'enable_theme_default' => true, ] ); } endif; add_action( 'after_setup_theme', 'varia_setup' ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function varia_widgets_init() { register_sidebar( array( 'name' => __( 'Footer', 'varia' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your footer.', 'varia' ), 'before_widget' => '
', 'before_title' => '