get( 'Version' ) ); // Enqueue theme stylesheet. wp_enqueue_style( 'formwork-style' ); } endif; add_action( 'wp_enqueue_scripts', 'formwork_styles' ); if ( ! function_exists( 'formwork_block_stylesheets' ) ) : /** * Enqueue custom block stylesheets. * * @since formwork 1.0 * @return void */ function formwork_block_stylesheets() { $formwork_styled_blocks = array( 'core/accordion' => 'accordion', 'core/calendar' => 'calendar', ); foreach ( $formwork_styled_blocks as $block_name_with_namespace => $block_name ) { wp_enqueue_block_style( $block_name_with_namespace, array( 'handle' => 'formwork-' . $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', 'formwork_block_stylesheets' );