From 465355a775e96e0923cf5be5b32e16ca60f5bc19 Mon Sep 17 00:00:00 2001 From: Dekart Deploy Bot Date: Sun, 28 Jun 2026 16:17:21 +0000 Subject: [PATCH] =?UTF-8?q?2026-06-2026=20=D0=9E=D1=82=D0=B7=D1=8B=D0=B2?= =?UTF-8?q?=D1=8B=20=D0=BF=D0=BE=D0=BB=D0=BD=D1=8B=D0=B9=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=D0=B8=D0=B7=D0=B0=D0=B9=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-content/themes/dekart/functions.php | 25 ++++++++++++++++++++ wp-content/themes/dekart/header.php | 6 ++++- wp-content/themes/dekart/page-reviews.php | 28 +++++++++++++++-------- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/wp-content/themes/dekart/functions.php b/wp-content/themes/dekart/functions.php index 08455ea..9cf99cb 100644 --- a/wp-content/themes/dekart/functions.php +++ b/wp-content/themes/dekart/functions.php @@ -1383,6 +1383,31 @@ function enqueue_template_specific_styles() { } add_action('wp_enqueue_scripts', 'enqueue_template_specific_styles'); +/** + * Helper: determine if current page needs Swiper slider assets. + * + * @return bool True if the current page uses Swiper directly or via template-parts. + */ +function needs_swiper(): bool { + if ( is_singular( [ 'course', 'teacher' ] ) ) { + return true; + } + $swiper_templates = [ + 'page-after-school.php', + 'page-foto.php', + 'page-o-nas.php', + 'page-school.php', + 'page-contacts.php', + 'page-teachers.php', + ]; + foreach ( $swiper_templates as $tmpl ) { + if ( is_page_template( $tmpl ) ) { + return true; + } + } + return false; +} + add_shortcode( 'get_form_bitrix', 'form_bitrix' ); function form_bitrix( $atts, $content = null ) { return carbon_get_theme_option( 'site_bitrix_script' ); diff --git a/wp-content/themes/dekart/header.php b/wp-content/themes/dekart/header.php index d185b46..c5e32e7 100644 --- a/wp-content/themes/dekart/header.php +++ b/wp-content/themes/dekart/header.php @@ -14,7 +14,7 @@ + + + + diff --git a/wp-content/themes/dekart/page-reviews.php b/wp-content/themes/dekart/page-reviews.php index b8ad7da..7a98984 100644 --- a/wp-content/themes/dekart/page-reviews.php +++ b/wp-content/themes/dekart/page-reviews.php @@ -18,15 +18,16 @@ add_filter( 'wpseo_opengraph_type', function ( $type ) { return $type; } ); add_filter( 'wpseo_frontend_presenter_classes', function ( $presenters ) { - if ( is_page_template( 'page-reviews.php' ) ) { - $presenters = array_filter( $presenters, function ( $p ) { - - return strpos( $p, 'Open_Graph' ) === false - && strpos( $p, 'Article_' ) === false - && strpos( $p, 'Label1' ) === false - && strpos( $p, 'Data1' ) === false - && strpos( $p, 'Twitter' ) === false; - } ); + if ( is_page_template( 'page-reviews.php' ) ) { + $presenters = array_filter( $presenters, function ( $p ) { + + return strpos( $p, 'Open_Graph' ) === false + && strpos( $p, 'Article_' ) === false + && strpos( $p, 'Label1' ) === false + && strpos( $p, 'Data1' ) === false + && strpos( $p, 'Twitter' ) === false + && strpos( $p, 'Slack' ) === false; + } ); } return $presenters; } ); @@ -98,6 +99,7 @@ $branch_addr = get_option( 'branch_address' ) ?: carbon_get_theme_option( 'sit $branch_coords = get_option( 'branch_coords' ) ?: carbon_get_theme_option( 'site_location' ) ?: ''; $branch_logo = get_option( 'branch_logo' ) ?: ''; $branch_region = get_option( 'branch_region' ) ?: 'Московская область'; +$branch_price_range = get_option( 'branch_price_range', '' ); $branch_social = get_option( 'branch_social' ) ?: carbon_get_theme_option( 'social_media' ) ?: array(); $branch_messengers = get_option( 'branch_messengers', array() ); @@ -1145,7 +1147,7 @@ if ( ! empty( $schema_description ) && is_string( $schema_description ) ) { } $organization = array( - '@type' => array( 'School', 'LocalBusiness' ), + '@type' => 'School', '@id' => home_url( '/' ) . '#organization', 'name' => $branch_name, 'description' => $org_description, @@ -1154,6 +1156,10 @@ $organization = array( 'areaServed' => $area_served, ); +if ( $branch_price_range ) { + $organization['priceRange'] = $branch_price_range; +} + if ( ! empty( $hours_spec ) ) { $organization['openingHoursSpecification'] = $hours_spec; } @@ -1189,6 +1195,8 @@ if ( $jsonld_img_url ) { } if ( $school_image_url ) { $organization['image'] = $school_image_url; +} elseif ( $jsonld_img_url ) { + $organization['image'] = $jsonld_img_url; } if ( ! empty( $jsonld_social ) ) { $organization['sameAs'] = $jsonld_social;