__( 'Tiny', 'spearhead' ), 'shortName' => __( 'XS', 'spearhead' ), 'size' => 14, 'slug' => 'xs', ), array( 'name' => __( 'Small', 'spearhead' ), 'shortName' => __( 'S', 'spearhead' ), 'size' => 16, 'slug' => 'small', ), array( 'name' => __( 'Medium', 'spearhead' ), 'shortName' => __( 'M', 'spearhead' ), 'size' => 20, 'slug' => 'medium', ), array( 'name' => __( 'Large', 'spearhead' ), 'shortName' => __( 'L', 'spearhead' ), 'size' => 24, 'slug' => 'large', ), array( 'name' => __( 'XL', 'spearhead' ), 'shortName' => __( 'XL', 'spearhead' ), 'size' => 36, 'slug' => 'xl', ), array( 'name' => __( 'Huge', 'spearhead' ), 'shortName' => __( 'XXL', 'spearhead' ), 'size' => 48, 'slug' => 'huge', ), ) ); // Add child theme editor color pallete to match Sass-map variables in `_config-child-theme-deep.scss`. add_theme_support( 'editor-color-palette', array( array( 'name' => __( 'Primary', 'spearhead' ), 'slug' => 'primary', 'color' => '#000000', ), array( 'name' => __( 'Background', 'spearhead' ), 'slug' => 'background', 'color' => '#BFF5A5', ), ) ); } endif; add_action( 'after_setup_theme', 'spearhead_setup', 12 ); /** * Filter the content_width in pixels, based on the child-theme's design and stylesheet. */ function spearhead_content_width() { return 744; } add_filter( 'seedlet_content_width', 'spearhead_content_width' ); /** * Enqueue scripts and styles. */ function spearhead_scripts() { // enqueue Google fonts, if necessary wp_enqueue_style( 'spearhead-fonts', spearhead_fonts_url(), array(), null ); // Child theme variables wp_enqueue_style( 'spearhead-variables-style', get_stylesheet_directory_uri() . '/variables.css', array(), wp_get_theme()->get( 'Version' ) ); // enqueue child styles wp_enqueue_style('spearhead-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' )); // enqueue child RTL styles wp_style_add_data( 'spearhead-style', 'rtl', 'replace' ); } add_action( 'wp_enqueue_scripts', 'spearhead_scripts', 11 ); /** * Enqueue Custom Cover Block Styles and Scripts */ function spearhead_block_extends() { // Block Tweaks wp_enqueue_script( 'spearhead-block-extends', get_stylesheet_directory_uri() . '/assets/js/extend-blocks.js', array( 'wp-blocks', 'wp-edit-post' ) // wp-edit-post is added to avoid a race condition when trying to unregister a style variation ); } add_action( 'enqueue_block_assets', 'spearhead_block_extends' ); /** * Add Google webfonts * * @return string */ function spearhead_fonts_url() : string { $fonts_url = ''; $font_families = array(); $font_families[] = 'family=Red+Hat+Display:ital,wght@0,900;1,900'; $font_families[] = 'family=Red+Hat+Text:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700'; $font_families[] = 'display=swap'; // Make a single request for the theme fonts. $fonts_url = 'https://fonts.googleapis.com/css2?' . implode( '&', $font_families ); return $fonts_url; } /** * Load extras */ // require get_stylesheet_directory() . '/inc/custom-header.php';