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( 1140, 1140, false ); // Set the default content width. $GLOBALS['content_width'] = 540; /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'video', 'gallery', 'audio', 'quote', 'link' ) ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Primary', 'atlantic' ), 'menu-2' => esc_html__( 'Social Link', 'atlantic' ), ) ); /* * 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', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'atlantic_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style( array( atlantic_fonts_url(), 'assets/css/editor-style.min.css' ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); // Default block styles add_theme_support( 'wp-block-styles' ); // Block color Palettes add_theme_support( 'editor-color-palette', array( array( 'name' => esc_attr__( 'strong magenta', 'atlantic' ), 'slug' => 'strong-magenta', 'color' => '#a156b4', ), array( 'name' => esc_attr__( 'light grayish magenta', 'atlantic' ), 'slug' => 'light-grayish-magenta', 'color' => '#d0a5db', ), array( 'name' => esc_attr__( 'very light gray', 'atlantic' ), 'slug' => 'very-light-gray', 'color' => '#eee', ), array( 'name' => esc_attr__( 'very dark gray', 'atlantic' ), 'slug' => 'very-dark-gray', 'color' => '#444', ), )); // Block gradient presets add_theme_support( 'editor-gradient-presets', array( array( 'name' => esc_attr__( 'Vivid cyan blue to vivid purple', 'atlantic' ), 'gradient' => 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)', 'slug' => 'vivid-cyan-blue-to-vivid-purple' ), array( 'name' => esc_attr__( 'Vivid green cyan to vivid cyan blue', 'atlantic' ), 'gradient' => 'linear-gradient(135deg,rgba(0,208,132,1) 0%,rgba(6,147,227,1) 100%)', 'slug' => 'vivid-green-cyan-to-vivid-cyan-blue', ), array( 'name' => esc_attr__( 'Light green cyan to vivid green cyan', 'atlantic' ), 'gradient' => 'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)', 'slug' => 'light-green-cyan-to-vivid-green-cyan', ), array( 'name' => esc_attr__( 'Luminous vivid amber to luminous vivid orange', 'atlantic' ), 'gradient' => 'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)', 'slug' => 'luminous-vivid-amber-to-luminous-vivid-orange', ), array( 'name' => esc_attr__( 'Luminous vivid orange to vivid red', 'atlantic' ), 'gradient' => 'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)', 'slug' => 'luminous-vivid-orange-to-vivid-red', ), ) ); // Block font sizes add_theme_support( 'editor-font-sizes', array( array( 'name' => esc_attr__( 'Small', 'atlantic' ), 'size' => 12, 'slug' => 'small' ), array( 'name' => esc_attr__( 'Regular', 'atlantic' ), 'size' => 16, 'slug' => 'regular' ), array( 'name' => esc_attr__( 'Large', 'atlantic' ), 'size' => 36, 'slug' => 'large' ), array( 'name' => esc_attr__( 'Huge', 'atlantic' ), 'size' => 50, 'slug' => 'huge' ) ) ); // Block based template parts add_theme_support( 'block-template-parts' ); // register_block_style register_block_style( 'core/quote', array( 'name' => 'blue-quote', 'label' => __( 'Blue Quote', 'atlantic' ), 'is_default' => true, 'inline_style' => '.wp-block-quote.is-style-blue-quote { color: blue; }', ) ); // register_block_pattern register_block_pattern( 'wpdocs/my-example', array( 'title' => __( 'My First Block Pattern', 'atlantic' ), 'description' => _x( 'This is my first block pattern', 'Block pattern description', 'atlantic' ), 'content' => '
A single paragraph block style
', 'categories' => array( 'text' ), 'keywords' => array( 'cta', 'demo', 'example' ), 'viewportWidth' => 800, ) ); add_theme_support( "responsive-embeds" ); add_theme_support( "align-wide" ); } endif; add_action( 'after_setup_theme', 'atlantic_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 atlantic_content_width() { $content_width = $GLOBALS['content_width']; // Check if is single post and there is no sidebar. if ( is_singular() ) { $content_width = 1110; } /** * Filter Atlantic content width of the theme. */ $GLOBALS['content_width'] = apply_filters( 'atlantic_content_width', $content_width ); } add_action( 'template_redirect', 'atlantic_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function atlantic_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'atlantic' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'atlantic' ), 'before_widget' => '', 'before_title' => '