_x( 'Design Lab Patterns', 'Block pattern category', 'abc-studio' ), 'description' => __ ( 'A collection of professionally designed patterns.', 'abc-studio'), ) ); register_block_pattern_category( 'abc_studio_hero_pattern', array( 'label' => _x( 'Hero', 'Block pattern category', 'abc-studio' ), 'description' => __( 'A collection of Hero Sections, the first part of your website under your logo and menu.', 'abc-studio' ), ) ); register_block_pattern_category( 'abc_studio_page', array( 'label' => _x( 'Design Lab Page Layouts', 'Block pattern category', 'abc-studio' ), 'description' => __( 'A collection of full page layouts.', 'abc-studio' ), ) ); } add_action( 'init', 'abc_studio_register_block_patterns' ); /** * Register block styles. * * @package Abc Studio * @since 1.0.0 */ if ( function_exists( 'register_block_style' ) ) { function abc_studio_register_block_styles() { // Post Terms register_block_style( 'core/post-terms', array( 'name' => 'dl-pill-shape', 'label' => esc_html__( 'Pill shape', 'abc-studio' ), 'inline_style' => ' .wp-block-post-terms.is-style-dl-pill-shape a { display: inline-flex; position: relative; padding: 0.25em 1em; text-decoration: none; } .wp-block-post-terms.is-style-dl-pill-shape a:before { content: ""; background: var(--wp--preset--color--contrast); width: 100%; height: 100%; position: absolute; left: 0; top: 0; border-radius: 32px; opacity: 0.07; transition: opacity .25s ease; } .wp-block-post-terms.is-style-dl-pill-shape a:hover { opacity: 0.8; } .wp-block-post-terms.is-style-dl-pill-shape .wp-block-post-terms__separator { visibility: hidden; }', ) ); // Post Terms register_block_style( 'core/post-terms', array( 'name' => 'dl-outline-pill-shape', 'label' => esc_html__( 'Outline Pill shape', 'abc-studio' ), 'inline_style' => ' .wp-block-post-terms.is-style-dl-outline-pill-shape a { display: inline-flex; position: relative; padding: 0.25em 1em; text-decoration: none; border: 1px solid currentColor; border-radius: 32px; opacity: 1; transition: opacity .25s ease; } .wp-block-post-terms.is-style-dl-outline-pill-shape a:hover { opacity: .8; text-decoration: none; } .wp-block-post-terms.is-style-dl-outline-pill-shape .wp-block-post-terms__separator { visibility: hidden; }', ) ); // List register_block_style( 'core/list', array( 'name' => 'dl-check-list', 'label' => esc_html__( 'Check list', 'abc-studio' ), 'inline_style' => ' html { --dl-check-icon: url(\'data:image/svg+xml,\') } .is-style-dl-check-list { list-style-type: none; line-height: var(--wp--custom--typography--line-height--medium); padding: 0 0 0 1em; } .is-style-dl-check-list li { position: relative; padding-left: 2em; } .is-style-dl-check-list li:not(:first-child) { margin-top: 0.5em; } .is-style-dl-check-list li:before { content: " "; display: block; width: 24px; height: 24px; position: absolute; left: 0; top: 2px; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; background-color: currentColor; -webkit-mask-image: var(--dl-check-icon); mask-image: var(--dl-check-icon); }', ) ); register_block_style( 'core/list', array( 'name' => 'dl-arrow-list', 'label' => esc_html__( 'Arrow list', 'abc-studio' ), 'inline_style' => ' html { --dl-arrow-icon: url(\'data:image/svg+xml,\') } .is-style-dl-arrow-list { list-style-type: none; line-height: var(--wp--custom--typography--line-height--medium); padding: 0; } .is-style-dl-arrow-list li { position: relative; padding-left: 2.5em; } .is-style-dl-arrow-list li:not(:first-child) { margin-top: .5em; } .is-style-dl-arrow-list li:before { content: " "; display: block; width: 32px; height: 16px; position: absolute; left: 0; top: 8px; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; background-color: currentColor; -webkit-mask-image: var(--dl-arrow-icon); mask-image: var(--dl-arrow-icon); }', ) ); // Details register_block_style( 'core/details', array( 'name' => 'dl-plus-icon-details', 'label' => __( 'Plus icon', 'abc-studio' ), 'inline_style' => ' .is-style-dl-plus-icon-details { padding: var(--wp--preset--spacing--20); } .is-style-dl-plus-icon-details summary { outline: 0; list-style-type: "\002B\00a0\00a0"; } .is-style-dl-plus-icon-details[open] > summary { list-style-type: "\2212\00a0\00a0"; } .is-style-dl-plus-icon-details summary::marker { font-size: 1.5em; line-height: 1; }', ) ); // Separator register_block_style( 'core/separator', array( 'name' => 'dl-small-dots', 'label' => esc_html__( 'Grid of dots x1', 'abc-studio' ), 'inline_style' => ' html { --dl-dots-small: url(\'data:image/svg+xml,\'); } hr.wp-block-separator.is-style-dl-small-dots { width: 52px !important; height: 52px !important; background-color: unset !important; border: 0; color: inherit; margin-left: 0; margin-right: 0; transform: none; } hr.wp-block-separator.is-style-dl-small-dots:before { content: ""; display: block; height: inherit; width: inherit; mask-image: var(--dl-dots-small); mask-repeat: no-repeat; background-color: currentColor; }', ) ); register_block_style( 'core/separator', array( 'name' => 'dl-medium-dots', 'label' => esc_html__( 'Grid of dots x3', 'abc-studio' ), 'inline_style' => ' html { --dl-dots-medium: url(\'data:image/svg+xml,\'); } hr.wp-block-separator.is-style-dl-medium-dots { width: 180px !important; height: 52px !important; background-color: unset !important; border: 0; color: inherit; margin-left: 0; margin-right: 0; transform: none; } hr.wp-block-separator.is-style-dl-medium-dots:before { content: ""; display: block; height: inherit; width: inherit; mask-image: var(--dl-dots-medium); mask-repeat: repeat-x; background-color: currentColor; }', ) ); register_block_style( 'core/separator', array( 'name' => 'dl-arrows', 'label' => esc_html__( 'Three Arrows', 'abc-studio' ), 'inline_style' => ' html { --dl-arrows: url(\'data:image/svg+xml,\'); } hr.wp-block-separator.is-style-dl-arrows { width: 52px !important; height: 24px !important; background-color: unset !important; border: 0; color: inherit; margin-left: 0; margin-right: 0; transform: none; } hr.wp-block-separator.is-style-dl-arrows:before { content: ""; display: block; height: inherit; width: inherit; mask-image: var(--dl-arrows); mask-repeat: repeat-x; background-color: currentColor; }', ) ); } add_action( 'init', 'abc_studio_register_block_styles' ); } /** * Add About Page * @package Abc Studio * @since 1.0.0 */ require_once get_template_directory() . '/inc/about-page/about-abc-studio.php'; /** * Add Upsell notice * @package Abc Studio * @since 1.0.0 */ function abc_studio_notice() { $user_id = get_current_user_id(); if ( ! get_user_meta( $user_id, 'abc_studio_notice_dismissed' ) ) { ?>