get( 'Version' ) ); // Enqueue theme stylesheet. wp_enqueue_style( 'roblog-style' ); } endif; add_action( 'wp_enqueue_scripts', 'roblog_styles' ); if ( ! function_exists( 'roblog_block_styles' ) ) : /** * Register custom block styles * * @since roblog 1.0 * @return void */ function roblog_block_styles() { register_block_style( 'core/avatar', array( 'name' => 'playful', 'label'=> __( 'Playful', 'roblog' ) ) ); register_block_style( 'core/post-terms', array( 'name'=> 'pill', 'label'=> __( 'Pill', 'roblog' ), ) ); register_block_style( 'core/site-logo', array( 'name' => 'playful', 'label'=> __( 'Playful', 'roblog' ) ) ); } endif; add_action( 'init', 'roblog_block_styles' ); if ( ! function_exists( 'roblog_block_stylesheets' ) ) : /** * Enqueue custom block stylesheets * * @since roblog 1.0 * @return void */ function roblog_block_stylesheets() { $roblog_styled_blocks = array( 'core/archives' => 'archives', 'core/audio' => 'audio', 'core/avatar' => 'avatar', 'core/button' => 'button', 'core/calendar' => 'calendar', 'core/categories' => 'categories', 'core/comment-content' => 'comment-content', 'core/comments-pagination' => 'comments-pagination', 'core/embed' => 'embed', 'core/image' => 'image', 'core/latest-comments' => 'latest-comments', 'core/latest-posts' => 'latest-posts', 'core/navigation' => 'navigation', 'core/page-list' => 'page-list', 'core/post-author' => 'post-author', 'core/post-comments-form' => 'post-comments-form', 'core/post-excerpt' => 'post-excerpt', 'core/post-terms' => 'post-terms', 'core/pullquote' => 'pullquote', 'core/query-pagination-next' => 'query-pagination-next', 'core/query-pagination-numbers' => 'query-pagination-numbers', 'core/query-pagination-previous' => 'query-pagination-previous', 'core/quote' => 'quote', 'core/search' => 'search', 'core/separator' => 'separator', 'core/site-logo' => 'site-logo', 'core/table' => 'table', 'core/tag-cloud' => 'tag-cloud', 'core/term-description' => 'term-description', 'core/video' => 'video' ); foreach ( $roblog_styled_blocks as $block_name_with_namespace => $block_name ) { wp_enqueue_block_style( $block_name_with_namespace, array( 'handle' => 'roblog-' . $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', 'roblog_block_stylesheets' );