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' ); add_image_size( 'radcliffe-post-image', 2000, 1500 ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Header', 'radcliffe-2' ), ) ); /* * 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 theme support for Custom Logo. add_theme_support( 'custom-logo', array( 'width' => 1200, 'height' => 900, 'flex-width' => true, 'flex-height' => true, 'header-text' => array( 'site-title', 'site-description' ), ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'radcliffe_2_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); // Add support for responsive embeds. add_theme_support( 'responsive-embeds' ); // Gutenberg: Add Custom Palette $stylepack = get_theme_mod( 'active_style_pack' ); if ( 'vintage' === $stylepack ) { add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Vintage Off-White', 'radcliffe-2' ), 'slug' => 'vintage-off-white', 'color' => '#fff', ), array( 'name' => esc_html__( 'Vintage Light Brown', 'radcliffe-2' ), 'slug' => 'vintage-light-brown', 'color' => '#c7c4b4', ), array( 'name' => esc_html__( 'Vintage Light Gray', 'radcliffe-2' ), 'slug' => 'vintage-light-gray', 'color' => '#666', ), array( 'name' => esc_html__( 'Vintage Dark Gray', 'radcliffe-2' ), 'slug' => 'vintage-dark-gray', 'color' => '#222', ), array( 'name' => esc_html__( 'Vintage Blue', 'radcliffe-2' ), 'slug' => 'vintage-blue', 'color' => '#2b6e9d', ), ) ); } elseif ( 'colorful' === $stylepack ) { add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Colorful White', 'radcliffe-2' ), 'slug' => 'colorful-white', 'color' => '#fff', ), array( 'name' => esc_html__( 'Colorful Light Gray', 'radcliffe-2' ), 'slug' => 'colorful-light-gray', 'color' => '#e5e5e5', ), array( 'name' => esc_html__( 'Colorful Dark Gray', 'radcliffe-2' ), 'slug' => 'colorful-dark-gray', 'color' => '#222222', ), array( 'name' => esc_html__( 'Colorful Blue', 'radcliffe-2' ), 'slug' => 'colorful-blue', 'color' => '#4ba3c3', ), array( 'name' => esc_html__( 'Colorful Green', 'radcliffe-2' ), 'slug' => 'colorful-green', 'color' => '#71db9d', ), array( 'name' => esc_html__( 'Colorful Orange', 'radcliffe-2' ), 'slug' => 'colorful-orange', 'color' => '#d97059', ), ) ); } elseif ( 'modern' === $stylepack ) { add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Modern White', 'radcliffe-2' ), 'slug' => 'modern-white', 'color' => '#fff', ), array( 'name' => esc_html__( 'Modern Light Gray', 'radcliffe-2' ), 'slug' => 'modern-light-gray', 'color' => '#f1f1f1', ), array( 'name' => esc_html__( 'Modern Medium Gray', 'radcliffe-2' ), 'slug' => 'modern-medium-gray', 'color' => '#aaa', ), array( 'name' => esc_html__( 'Modern Dark Gray', 'radcliffe-2' ), 'slug' => 'modern-dark-gray', 'color' => '#222', ), ) ); } else { add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'White', 'radcliffe-2' ), 'slug' => 'white', 'color' => '#fff', ), array( 'name' => esc_html__( 'Dark Gray', 'radcliffe-2' ), 'slug' => 'dark-gray', 'color' => '#222', ), array( 'name' => esc_html__( 'Light Gray', 'radcliffe-2' ), 'slug' => 'light-gray', 'color' => '#666666', ), array( 'name' => esc_html__( 'Red', 'radcliffe-2' ), 'slug' => 'red', 'color' => '#ca2017', ), ) ); } // Add support for wide alignment add_theme_support( 'align-wide' ); } endif; add_action( 'after_setup_theme', 'radcliffe_2_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 radcliffe_2_content_width() { $GLOBALS['content_width'] = apply_filters( 'radcliffe_2_content_width', 740 ); } add_action( 'after_setup_theme', 'radcliffe_2_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function radcliffe_2_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Footer 1', 'radcliffe-2' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '
', 'before_title' => '