get( 'Version' ) ); // Enqueue theme stylesheet. wp_enqueue_style( 'quennell-style' ); } endif; add_action( 'wp_enqueue_scripts', 'quennell_styles' ); if ( ! function_exists( 'quennell_block_stylesheets' ) ) : /** * Enqueue custom block stylesheets. * * @since quennell 1.0 * @return void */ function quennell_block_stylesheets() { $quennell_styled_blocks = array( 'core/calendar' => 'calendar', 'core/table' => 'table', ); foreach ( $quennell_styled_blocks as $block_name_with_namespace => $block_name ) { wp_enqueue_block_style( $block_name_with_namespace, array( 'handle' => 'quennell-' . $block_name, 'src' => get_template_directory_uri() . '/assets/css/blocks/' . $block_name . '.css', 'path' => get_template_directory() . '/assets/css/blocks/' . $block_name . '.css', ) ); } } endif; add_action( 'init', 'quennell_block_stylesheets' ); if ( ! function_exists( 'quennell_pattern_categories' ) ) : /** * Registers the theme pattern categories. * * @since Quennell 1.0 * @return void */ function quennell_pattern_categories() { register_block_pattern_category( 'quennell', array( 'label' => __( 'Quennell', 'quennell' ) ) ); register_block_pattern_category( 'pages', array( 'label' => __( 'Pages', 'quennell' ) ) ); } endif; add_action( 'init', 'quennell_pattern_categories' ); if ( ! function_exists( 'quennell_block_styles' ) ) : /** * Registers the block styles used by the theme patterns. * * @since Quennell 1.0 * @return void */ function quennell_block_styles() { register_block_style( 'core/paragraph', array( 'name' => 'display', 'label' => __( 'Display', 'quennell' ), 'style_data' => array( 'typography' => array( 'fontFamily' => 'var(--wp--preset--font-family--heading)', 'fontWeight' => '440', 'letterSpacing' => '-0.03em', 'lineHeight' => '1.15', ), ), ) ); register_block_style( array( 'core/cover', 'core/image', 'core/post-featured-image' ), array( 'name' => 'halftone', 'label' => __( 'Halftone', 'quennell' ), ) ); register_block_style( 'core/group', array( 'name' => 'hover-invert', 'label' => __( 'Hover invert', 'quennell' ), ) ); register_block_style( 'core/heading', array( 'name' => 'label', 'label' => __( 'Label', 'quennell' ), 'style_data' => array( 'typography' => array( 'fontFamily' => 'var(--wp--preset--font-family--body)', 'fontWeight' => '600', 'letterSpacing' => '0', 'lineHeight' => '1.35', ), ), ) ); } endif; add_action( 'init', 'quennell_block_styles' );