diff --git a/blocks/club-cards-block/club-cards-block.php b/blocks/club-cards-block/club-cards-block.php index ef33e1d..b1775c8 100644 --- a/blocks/club-cards-block/club-cards-block.php +++ b/blocks/club-cards-block/club-cards-block.php @@ -29,41 +29,63 @@ if (!function_exists('get_club_cards_for_current_language')) { } $cards = get_club_cards_for_current_language(); +$heading = get_field('heading', $block['id']); ?> -
- -
- -
- ID)): ?> -
- ID, 'medium', ['class' => 'w-full h-full object-cover']); ?> -
- - -
-

- ID); ?> -

- - ID)): ?> -
- ID); ?> +
+
+ +

+ + +
+ +
+ ID); + if ($card_image): ?> +
+ <?php echo esc_attr($card_image['alt']); ?>
- -
- +
+ ID); ?> + +

+ +

+ + + ID); ?> + +
+ +
+ + + ID); ?> + +
+ От Р. +
+ + + +
+ ID); ?> + +
-
- -
- -
\ No newline at end of file + +
+ +
+ \ No newline at end of file diff --git a/blocks/tiles-block/tiles-block.php b/blocks/tiles-block/tiles-block.php index f4bd5d9..04081f5 100644 --- a/blocks/tiles-block/tiles-block.php +++ b/blocks/tiles-block/tiles-block.php @@ -31,7 +31,7 @@ $tiles_repeater = get_field('tiles_repeater');
-
+
diff --git a/functions/blocks.php b/functions/blocks.php index c2c5715..068e69c 100644 --- a/functions/blocks.php +++ b/functions/blocks.php @@ -73,6 +73,29 @@ function register_acf_blocks() { ), )); + acf_register_block_type(array( + 'name' => 'form-block', + 'title' => __('Блок формы'), + 'description' => __('Блок формы обратной связи'), + 'render_template' => 'template-parts/la-components/blocks/form-block/form-block.php', + 'category' => 'theme-blocks', + 'icon' => 'id-alt', + 'keywords' => array('форма', 'форма записи', 'имя', 'телефон'), + 'supports' => array( + 'align' => array('wide', 'full'), + 'anchor' => true, + 'customClassName' => true, + ), + 'enqueue_assets' => function() { + wp_enqueue_style( + 'form-block-css', + get_template_directory_uri() . '/template-parts/la-components/blocks/form-block/form-block.css', + [], + '1.0.0' + ); + } + )); + acf_register_block_type(array( 'name' => 'tiles-block', 'title' => __('Блок с плитками'), @@ -88,6 +111,22 @@ function register_acf_blocks() { ), )); + + acf_register_block_type(array( + 'name' => 'advantages-block', + 'title' => __('Блок преимуществ'), + 'description' => __('Блок с преимуществами'), + 'render_template' => 'template-parts/la-components/blocks/advantages-block/advantages-block.php', + 'category' => 'theme-blocks', + 'icon' => 'grid-view', + 'keywords' => array('преимущества', 'карточки', 'advantages', 'преимущество'), + 'supports' => array( + 'align' => array('wide', 'full'), + 'anchor' => true, + 'customClassName' => true, + ), + )); + acf_register_block_type(array( 'name' => 'reviews-block', 'title' => __('Блок с отзывами'), diff --git a/functions/modals.php b/functions/modals.php index 2dc2234..b79af41 100644 --- a/functions/modals.php +++ b/functions/modals.php @@ -5,15 +5,13 @@ function enqueue_theme_scripts() { 'modals-js', get_template_directory_uri() . '/template-parts/la-components/js/modals.js', array('jquery'), - '1.0.0', + '2.0.0', true ); } add_action('wp_enqueue_scripts', 'enqueue_theme_scripts'); -// Вывод всех модалок в футере function modal_system_container() { - // Получаем список всех модалок $modals_dir = get_template_directory() . '/template-parts/la-components/modals/'; $modals = array(); @@ -26,25 +24,18 @@ function modal_system_container() { } } - // общий контейнер ?> -