alleyinteractive / alleyinteractive/wp-seo
Define the WP SEO v2 feature taxonomy and recommended feature set
- Ngôn ngữ chính
- PHP
- Star
- 45
- Fork
- 13
- Merge trung bình
- 12 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
### Description
**Resolved.** The taxonomy is recorded in `docs/adr/0010-feature-taxonomy.md` on the `v2.0` branch. Summary below; the ADR carries the reasoning.
Features divide by **output type**, not by the surface that produces it or the page type it acts for. Each covers its output everywhere it appears -- post, term, archive, search, 404 -- and owns both its front-end rendering and its editor field.
| Feature | Handle | Source today |
| --- | --- | --- |
| Title Tags | `titles` | `php/class-wp-seo.php` (`pre_get_document_title`, `wp_title`) |
| Meta Descriptions | `descriptions` | `php/class-wp-seo.php` (`wp_head`) |
| Canonical URLs | `canonical_urls` | `php/class-wp-seo.php` (`wp_head`) |
| Robots Meta | `robots_meta` | `php/class-wp-seo.php` (`wp_robots`) |
| Open Graph | `open_graph` | ✅ already migrated |
| Arbitrary Meta Tags | `arbitrary_tags` | `php/class-wp-seo.php` (`wp_head`) |
Handles are flat, lowercase, underscore-separated. Titles and descriptions are separate features, not one combined feature.
### Not features -- infrastructure
Per the sharpened definition in `CONTEXT.md`, a Feature is something a site could choose to do without and would have an opinion about. Scaffolding that exists so features can do their job is not a feature and loads unconditionally:
* **The editor's SEO meta box** stays a single box, registered unconditionally, that enabled features contribute fields to. It renders nothing when nothing contributes.
* **Formatting tags** (`#site_name#`, `#title#`) -- the notation formats are written in.
* **`php/default-filters.php`** dissolves: container wiring becomes infrastructure, per-field bits move to their owning features.
### Deferred
* **Display categories** on the features screen -- decided in principle (`docs/adr/0009-...`), applied later. Categories are display-only and can be added any time without breaking a filter contract, unlike handles.
* **Recommended feature set** -- #200.
* **Page Type axis in the admin** -- #199.
### Remaining work
Each feature migrates on its own branch, wrapped as it moves (wrapping is part of migrating). Each migration deletes a `require_once` from `wp-seo.php`, so they conflict if run in parallel -- stack them.
Still in `php/`, ~3,700 lines: `class-wp-seo.php` (918), `class-wp-seo-settings.php` (1,137, see #194), `admin-template.php` (643), `default-formatting-tags.php` (603), plus helpers.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.