get( 'Version' ) ); // Enqueue theme stylesheet. wp_enqueue_style( 'homelot-style' ); } endif; add_action( 'wp_enqueue_scripts', 'homelot_styles' ); // Registers the block pattern categories used by the theme's patterns. if ( ! function_exists( 'homelot_register_pattern_categories' ) ) : /** * Registers block pattern categories so the theme's patterns are grouped * correctly in the inserter instead of falling under "Uncategorized". * * @since Homelot 1.0 * @return void */ function homelot_register_pattern_categories() { $categories = array( 'about' => __( 'About', 'homelot' ), 'banner' => __( 'Banners', 'homelot' ), 'call-to-action' => __( 'Call to Action', 'homelot' ), 'featured' => __( 'Featured', 'homelot' ), 'gallery' => __( 'Gallery', 'homelot' ), 'header' => __( 'Headers', 'homelot' ), 'homelot' => __( 'Homelot', 'homelot' ), 'query' => __( 'Query', 'homelot' ), 'team' => __( 'Team', 'homelot' ), 'text' => __( 'Text', 'homelot' ), ); foreach ( $categories as $slug => $label ) { register_block_pattern_category( $slug, array( 'label' => $label ) ); } } endif; add_action( 'init', 'homelot_register_pattern_categories' ); // Registers custom block styles used by the theme's patterns. if ( ! function_exists( 'homelot_register_block_styles' ) ) : /** * Registers the "Status Pill" style for post terms used as a listing status. * * @since Homelot 1.0 * @return void */ function homelot_register_block_styles() { register_block_style( 'core/post-terms', array( 'name' => 'status-pill', 'label' => __( 'Status Pill', 'homelot' ), 'inline_style' => '.wp-block-post-terms.is-style-status-pill{display:inline-block;width:fit-content;border:1px solid var(--wp--preset--color--contrast);border-radius:300px;padding:0 var(--wp--preset--spacing--20);text-transform:uppercase;}.wp-block-post-terms.is-style-status-pill a{text-decoration:none;}', ) ); } endif; add_action( 'init', 'homelot_register_block_styles' );