get( 'Version' ) ); // Enqueue theme stylesheet. wp_enqueue_style( 'lather-style' ); } endif; add_action( 'wp_enqueue_scripts', 'lather_styles' ); if ( ! function_exists( 'lather_block_stylesheets' ) ) : /** * Enqueue custom block stylesheets. * * @since lather 1.0 * @return void */ function lather_block_stylesheets() { $lather_styled_blocks = array( 'core/accordion' => 'accordion', 'core/calendar' => 'calendar', 'core/table' => 'table', ); foreach ( $lather_styled_blocks as $block_name_with_namespace => $block_name ) { wp_enqueue_block_style( $block_name_with_namespace, array( 'handle' => 'lather-' . $block_name, 'src' => get_theme_file_uri( 'assets/css/blocks/' . $block_name . '.css' ), 'path' => get_theme_file_path( 'assets/css/blocks/' . $block_name . '.css' ), ) ); } } endif; add_action( 'init', 'lather_block_stylesheets' ); if ( ! function_exists( 'lather_block_styles' ) ) : /** * Registers custom block styles. * * The Marquee style turns a Group into an endless horizontal ticker. * Its first inner Group is the moving track, holding two identical halves. * * @since Lather 1.0 * @return void */ function lather_block_styles() { register_block_style( 'core/group', array( 'name' => 'marquee', 'label' => __( 'Marquee', 'lather' ), 'inline_style' => ' .is-style-marquee { overflow: hidden; } .is-style-marquee > .wp-block-group { flex-wrap: nowrap; width: max-content; animation: lather-marquee 40s linear infinite; } .is-style-marquee > .wp-block-group > * { flex-shrink: 0; } @keyframes lather-marquee { to { transform: translateX(-50%); } }', ) ); } endif; add_action( 'init', 'lather_block_styles' ); if ( ! function_exists( 'lather_pattern_categories' ) ) : /** * Registers the theme's pattern category. * * @since Lather 1.0 * @return void */ function lather_pattern_categories() { register_block_pattern_category( 'lather', array( 'label' => __( 'Lather', 'lather' ), 'description' => __( 'Sections for cleaning services.', 'lather' ), ) ); register_block_pattern_category( 'lather_page', array( 'label' => __( 'Pages', 'lather' ), 'description' => __( 'A collection of full page layouts.', 'lather' ), ) ); } endif; add_action( 'init', 'lather_pattern_categories' );