Vladimir Bryzgalov 11bd3a06b0 feat(wpmc S3): Helpers::alt_get_field with do_shortcode + filter
Implements alt_get_field(): applies wpmc_alt_get_field_post_id filter for
post_id remapping, guards against missing ACF, runs do_shortcode on string
results, passes arrays/null through unchanged.  4 new tests; full suite
22 tests / 58 assertions green.

Note: Brain Monkey FunctionStub::__construct calls function_exists()
internally; expect() calls must precede when('function_exists')->alias()
in each test to avoid the alias intercepting the stub-creation check and
causing eval redeclaration errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 20:02:57 +05:00

WP Multi City

Мультигородская подсистема для WordPress: один сайт обслуживает несколько городов по схеме /{city}/{path}/ с подстановкой контента, ссылок и шорткодов.

Статус: v0.1.0 — скелет. Функционал в разработке (см. roadmap ниже).

Требования

  • WordPress 6.0+
  • PHP 8.0+
  • Advanced Custom Fields Pro

Установка (на v0.1.0)

  1. Скачать архив или склонировать в wp-content/plugins/wp-multi-city/.
  2. Активировать в админке WP. Если ACF Pro не активен — увидите admin-notice об ошибке зависимости.

Roadmap MVP

Этап Содержание Beads Статус
S1 Скелет (header, autoload, bootstrap) cp-8ci done
S2 Taxonomy town + CPT shortcode-town + ACF list_shortcode cp-q7g done
S3 [shortcode_dmr id=N] + хелперы (current_town, _alt_get_field, remove_domain_link) cp-arq open
S4 URL-роутер /{city}/{path}/ + page_unic + main_page_alt cp-83m open
S5 Фильтры the_title/the_content/the_permalink/rest_url cp-i17 open
S6 PHPUnit-тесты cp-la7 open
S7 Релиз через Gitea + plugin-update-checker cp-7cf open

Эпик: cp-cw4.

Источник

Плагин — переработка кастомной мультигородской подсистемы темы washanyanya (1555 строк inc/town-functions.php) в переиспользуемый плагин для других проектов.

S
Description
No description provided
Readme 388 KiB
1.1.0 Latest
2026-05-19 02:31:58 +05:00
Languages
PHP 95.8%
Shell 3.3%
JavaScript 0.5%
CSS 0.4%