12a271981a230f6e481158d9388b9d71a9f94068
Wrap 4 define() calls with defined() || guards to survive double-load. Replace hardcoded 'shortcode-town' strings in Taxonomy and FieldGroup with PostType::SLUG. Update Activator comment to reflect S2 reality. 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