11bd3a06b026ffb6cb9a3f0c0d866353278a0201
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>
WP Multi City
Мультигородская подсистема для WordPress: один сайт обслуживает несколько городов по схеме /{city}/{path}/ с подстановкой контента, ссылок и шорткодов.
Статус: v0.1.0 — скелет. Функционал в разработке (см. roadmap ниже).
Требования
- WordPress 6.0+
- PHP 8.0+
- Advanced Custom Fields Pro
Установка (на v0.1.0)
- Скачать архив или склонировать в
wp-content/plugins/wp-multi-city/. - Активировать в админке 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) в переиспользуемый плагин для других проектов.
Description