From b484d7ca196726827a4862570106980fc28f1777 Mon Sep 17 00:00:00 2001 From: Dekart Deploy Bot Date: Mon, 13 Jul 2026 06:39:32 +0000 Subject: [PATCH] Global-2026-07-13 --- .gitignore | 1 + AGENTS.md | 275 ++++++++++++++++-- .../mu-plugins/object-cache-bootstrap.php | 31 +- .../dekart/assets/css/podgotovka-k-shkole.css | 3 +- wp-content/themes/dekart/functions.php | 41 ++- .../themes/dekart/inc/class-pksh-data.php | 34 ++- .../dekart/page-podgotovka-k-shkole.php | 2 + .../dekart/template-parts/pksh/contacts.php | 29 +- .../dekart/template-parts/pksh/hero.php | 5 +- .../template-parts/pksh/how-it-works.php | 17 +- .../dekart/template-parts/pksh/reviews.php | 4 +- .../dekart/template-parts/svg-sprite.php | 77 +++++ 12 files changed, 444 insertions(+), 75 deletions(-) create mode 100644 wp-content/themes/dekart/template-parts/svg-sprite.php diff --git a/.gitignore b/.gitignore index e253328..2e63d5f 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,4 @@ wp-content/upgrade-temp-backup/ data/ llms.txt test.php +.agents/ diff --git a/AGENTS.md b/AGENTS.md index 4a29e69..c16e70e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,24 +1,251 @@ -# Site1 — WordPress project - -## Primary agent -- @site1 — dedicated WordPress agent (auto-activated, see `.opencode/AGENTS.md`) - -## Quick rules -- PHP: PSR-12, type declarations, Composer -- JS: TypeScript strict, ESM, async/await -- Commits: conventional commits (`feat:`, `fix:`, `chore:`, etc.) - -## Security -- NEVER modify wp-config.php without explicit confirmation -- NEVER delete files in uploads/ or wp-content/ without confirmation -- ALWAYS ask before destructive actions (rm, overwrite, DB write, git push) - -## Commands -- PHP test: `vendor/bin/phpunit` -- PHP lint: `vendor/bin/phpstan analyse` -- JS build: `npm run build` -- JS test: `npm test` -- JS lint: `npm run lint` - -## All details -See `.opencode/AGENTS.md` for full architecture, skills, agents list, and directory structure. +# Site1 — WordPress Project +## Agent +Primary agent: +- @site1 +This agent manages the WordPress project architecture, development workflow, frontend changes, SEO safety, and deployment preparation. +--- +# Project Context +Project type: +- Custom WordPress website. +Architecture: +- WordPress core. +- Custom theme: + `wp-content/themes/dekart/` +Theme contains: +- Templates +- Custom frontend styles +- Carbon Fields integration +- Schema.org JSON-LD logic +- Custom business data logic +Repository: +- Git is the source of truth. +- Theme changes are deployed through Git. +- Production and development environments are separated. +Important: +Before any changes, inspect existing architecture. +Do not assume standard WordPress structure. +--- +# Critical Rules +## Forbidden without explicit confirmation +NEVER modify: +- wp-config.php +- database structure +- production environment files +- uploads directory +- user data +- existing production configuration +Before executing: +- rm +- delete +- overwrite +- database write +- git push +Ask for confirmation. +--- +# WordPress Architecture Rules +## Theme +Location: +wp-content/themes/dekart/ +Rules: +Preserve: +- existing PHP templates +- template hierarchy +- hooks +- filters +- Carbon Fields compatibility +- schema.org output +- SEO logic +Do not: +- rebuild templates +- replace theme architecture +- move functionality into plugins without approval +- introduce page builders +--- +# Carbon Fields +Carbon Fields is intentionally located inside the theme. +Rules: +Do not: +- move Carbon Fields into a plugin +- rename fields +- change option keys +- modify stored data structure +Any changes must preserve backward compatibility. +--- +# Frontend / Redesign Rules +Goal: +Improve visual design without changing markup. +Allowed: +- CSS +- SCSS +- CSS variables +- typography +- colors +- spacing +- borders +- shadows +- animations +- responsive improvements +Forbidden: +- changing HTML structure +- changing block layout +- changing forms +- replacing components +- adding Elementor +- adding visual builders +Priority: +1. Preserve functionality +2. Preserve SEO +3. Preserve accessibility +4. Improve UI consistency +--- +# Modern Web Development +Use Google Chrome Modern Web Guidance principles. +Priorities: +- Accessibility +- Performance +- Responsive design +- Maintainable CSS +- Browser compatibility +Prefer: +- CSS variables +- reusable design tokens +- semantic CSS naming +- modern CSS compatible with Baseline +Avoid: +- unnecessary JavaScript +- duplicated CSS +- layout shifts +- heavy dependencies +Consider: +- Core Web Vitals +- CLS +- LCP +- accessibility contrast +- responsive behavior +--- +# Frontend Workflow +Before changing styles: +1. Audit existing CSS. +2. Identify: +- colors +- typography +- spacing +- components +- duplicated rules +- inconsistent UI patterns +Create design tokens when possible: +Example: +```css +:root { + --color-primary: + --color-secondary: + --color-text: + --color-background: + --border-radius: + --shadow: +} +Do not make blind global replacements. +SEO Safety +Never break: +title/meta logic +schema.org JSON-LD +breadcrumbs +canonical URLs +indexing behavior +structured data +Frontend changes must not affect SEO output. +Performance +Keep: +Core Web Vitals +minimal CSS overhead +optimized assets +no unnecessary scripts +Avoid: +additional libraries without approval +duplicate dependencies +blocking resources +Redis Object Cache +Current architecture: +Redis Object Cache plugin +mu-plugin bootstrap +WordPress object cache API +Rules: +Do not create another caching layer. +Do not create custom Redis clients. +Do not create custom object-cache.php. +Use: +wp_cache_get() +wp_cache_set() +Runtime files: +Never commit: +wp-content/object-cache.php +Development Standards +PHP +Use: +PSR-12 +type declarations where appropriate +WordPress coding standards +JavaScript +Use: +TypeScript strict +ESM +async/await +Avoid unnecessary frameworks. +Git Rules +Commit format: +feat: +fix: +refactor: +style: +chore: +docs: +Before commit: +Run: +git status +git diff +Never commit: +.env +uploads/ +logs/ +wp-content/object-cache.php +cache files +temporary files +Testing +PHP: +vendor/bin/phpunit +vendor/bin/phpstan analyse +JavaScript: +npm run build +npm test +npm run lint +Run only relevant checks for changed area. +Deployment Rules +Before deployment verify: +changed files +dependencies +environment requirements +database impact +cache impact +Never assume production environment matches development. +Required Work Process +For complex tasks: +Analyze current implementation. +Explain planned changes. +Wait for confirmation if architecture changes are required. +Implement minimal changes. +Verify result. +Provide report. +Final Response Format +After completing tasks always provide: +Summary +What was changed. +Files Changed +List files. +Technical Details +Explain implementation. +Validation +Tests and checks performed. +Risks +Possible issues. +Deployment Notes +Required production actions. \ No newline at end of file diff --git a/wp-content/mu-plugins/object-cache-bootstrap.php b/wp-content/mu-plugins/object-cache-bootstrap.php index 007c115..faddc58 100644 --- a/wp-content/mu-plugins/object-cache-bootstrap.php +++ b/wp-content/mu-plugins/object-cache-bootstrap.php @@ -1,14 +1,21 @@ 'text', - 'branch_city' => 'text', - 'branch_region' => 'text', - 'branch_address' => 'text', - 'branch_coords' => 'text', - 'branch_postal_code' => 'text', - 'branch_phone' => 'text', - 'branch_email' => 'email', - 'branch_name' => 'text', - 'branch_price_range' => 'text', + 'branch_city_prep' => 'text', + 'branch_city' => 'text', + 'branch_region' => 'text', + 'branch_address' => 'text', + 'branch_coords' => 'text', + 'branch_postal_code' => 'text', + 'branch_phone' => 'text', + 'branch_email' => 'email', + 'branch_name' => 'text', + 'branch_price_range' => 'text', + 'branch_logistics_walk' => 'text', + 'branch_logistics_parking' => 'text', + 'branch_logistics_schools' => 'text', ); foreach ( $text_fields as $slug => $type ) { register_setting( 'dekart_branch_group', $slug, array( 'sanitize_callback' => $type === 'email' ? 'sanitize_email' : ( $type === 'url' ? 'esc_url_raw' : 'sanitize_text_field' ) ) ); @@ -1912,6 +1915,9 @@ function dekart_branch_register_settings() { register_setting( 'dekart_branch_group', 'branch_remaining_seats', array( 'sanitize_callback' => 'absint' ) ); register_setting( 'dekart_branch_group', 'branch_schema_description', array( 'sanitize_callback' => 'sanitize_textarea_field' ) ); register_setting( 'dekart_branch_group', 'branch_area_served', array( 'sanitize_callback' => 'sanitize_text_field' ) ); + register_setting( 'dekart_branch_group', 'branch_logistics_walk', array( 'sanitize_callback' => 'sanitize_textarea_field' ) ); + register_setting( 'dekart_branch_group', 'branch_logistics_parking', array( 'sanitize_callback' => 'sanitize_textarea_field' ) ); + register_setting( 'dekart_branch_group', 'branch_logistics_nearby', array( 'sanitize_callback' => 'sanitize_textarea_field' ) ); // Поля branch_map_url, branch_founded, branch_photos — удалены. // Они дублировали CF таб «SEO и микроразметка» (schema_*). // Чтение: inc/schema.php → dekart_schema_option() → CF → Settings API (backward compat). @@ -1970,6 +1976,21 @@ function dekart_branch_settings_page() { +
+ + +

Например: «5 минут пешком от ТЦ «Глобус»

+
+
+ + +

Например: «Есть бесплатная парковка у входа»

+
+
+ + +

Например: «Рядом со школами №9 и №12, детским садом №15»

+
diff --git a/wp-content/themes/dekart/inc/class-pksh-data.php b/wp-content/themes/dekart/inc/class-pksh-data.php index ec94892..2d71600 100644 --- a/wp-content/themes/dekart/inc/class-pksh-data.php +++ b/wp-content/themes/dekart/inc/class-pksh-data.php @@ -211,8 +211,38 @@ class Pksh_Data { []; $this->branch['social'] = is_array( $raw ) ? $raw : []; } - wp_cache_set( $cache_key, $this->branch['social'], 'dekart_branch', DAY_IN_SECONDS ); - return $this->branch['social']; +wp_cache_set( $cache_key, $this->branch['social'], 'dekart_branch', DAY_IN_SECONDS ); + return $this->branch['social']; + } + + /** + * Логистика — пешком от ТЦ (branch_logistics_walk) + */ + public function get_logistics_walk(): string { + if ( ! array_key_exists( 'logistics_walk', $this->branch ) ) { + $this->branch['logistics_walk'] = get_option( 'branch_logistics_walk', '5 минут пешком от ТЦ «Глобус»' ); + } + return $this->branch['logistics_walk']; + } + + /** + * Логистика — парковка (branch_logistics_parking) + */ + public function get_logistics_parking(): string { + if ( ! array_key_exists( 'logistics_parking', $this->branch ) ) { + $this->branch['logistics_parking'] = get_option( 'branch_logistics_parking', 'Есть бесплатная парковка у входа' ); + } + return $this->branch['logistics_parking']; + } + + /** + * Логистика — соседние школы/сад (branch_logistics_schools) + */ + public function get_logistics_nearby(): string { + if ( ! array_key_exists( 'logistics_nearby', $this->branch ) ) { + $this->branch['logistics_nearby'] = get_option( 'branch_logistics_schools', 'Рядом со школами №9 и №12, детским садом №15' ); + } + return $this->branch['logistics_nearby']; } // ============================================================ diff --git a/wp-content/themes/dekart/page-podgotovka-k-shkole.php b/wp-content/themes/dekart/page-podgotovka-k-shkole.php index 76db256..fc76b9c 100644 --- a/wp-content/themes/dekart/page-podgotovka-k-shkole.php +++ b/wp-content/themes/dekart/page-podgotovka-k-shkole.php @@ -22,6 +22,8 @@ $data = Pksh_Data::instance(); get_header(); ?> + +
get_phone(); -$opt_email = $data->get_email(); -$opt_address = $data->get_address(); -$opt_social = $data->get_social_links(); -$opt_coords = $data->get_coords(); -$opt_name = $data->get_name(); +$data = Pksh_Data::instance(); +$opt_phone = $data->get_phone(); +$opt_email = $data->get_email(); +$opt_address = $data->get_address(); +$opt_social = $data->get_social_links(); +$opt_coords = $data->get_coords(); +$opt_name = $data->get_name(); +$opt_logistics_walk = $data->get_logistics_walk(); +$opt_logistics_parking = $data->get_logistics_parking(); +$opt_logistics_nearby = $data->get_logistics_nearby(); ?>
@@ -43,18 +46,24 @@ $opt_name = $data->get_name();
+ 📍 - 5 минут пешком от ТЦ «Глобус» + + + 🅿️ - Есть бесплатная парковка у входа + + + 🚸 - Рядом со школами №9 и №12, детским садом №15 + +
diff --git a/wp-content/themes/dekart/template-parts/pksh/hero.php b/wp-content/themes/dekart/template-parts/pksh/hero.php index 06a3f8c..a597091 100644 --- a/wp-content/themes/dekart/template-parts/pksh/hero.php +++ b/wp-content/themes/dekart/template-parts/pksh/hero.php @@ -30,10 +30,7 @@ $hero_metrics = $data->get_social_counters();
- + — центр
diff --git a/wp-content/themes/dekart/template-parts/pksh/how-it-works.php b/wp-content/themes/dekart/template-parts/pksh/how-it-works.php index 04e921e..16b3202 100644 --- a/wp-content/themes/dekart/template-parts/pksh/how-it-works.php +++ b/wp-content/themes/dekart/template-parts/pksh/how-it-works.php @@ -24,7 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
- +
Вход в тему @@ -33,7 +33,7 @@ if ( ! defined( 'ABSPATH' ) ) {
- +
Игровое задание @@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
- +
Рефлексия @@ -59,7 +59,7 @@ if ( ! defined( 'ABSPATH' ) ) {
- +
Не перегрузят ли ребёнка? @@ -68,22 +68,23 @@ if ( ! defined( 'ABSPATH' ) ) {
- +
Успеем ли до сентября?

Да. Наша программа рассчитана на 4–6 месяцев. Первые результаты — через 3 недели.

-
+
- +
Дорого? -

От 600 ₽ за занятие. Первое — бесплатно. А если не понравится — вернём деньги.

+

От 600 ₽ за занятие. Первое — бесплатно.

+
diff --git a/wp-content/themes/dekart/template-parts/pksh/reviews.php b/wp-content/themes/dekart/template-parts/pksh/reviews.php index bacfdd1..3635eeb 100644 --- a/wp-content/themes/dekart/template-parts/pksh/reviews.php +++ b/wp-content/themes/dekart/template-parts/pksh/reviews.php @@ -71,9 +71,7 @@ $total_count = count( $review_items );
- - - +
diff --git a/wp-content/themes/dekart/template-parts/svg-sprite.php b/wp-content/themes/dekart/template-parts/svg-sprite.php new file mode 100644 index 0000000..4617719 --- /dev/null +++ b/wp-content/themes/dekart/template-parts/svg-sprite.php @@ -0,0 +1,77 @@ + + \ No newline at end of file