docs: correct the project link markup call and resolve two open questions

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-15 14:01:43 -05:00
1 parent 036f9eeb3c
commit 7895e4e927
1 file changed
+3 -3
@@ -341,7 +341,7 @@ add_action( 'created_chrnx_project', 'chrnx_save_project_meta' );
- [ ] **Step 4: Confirm the term edit hook fires**
`chrnx_project_edit_form_fields` must be dispatched the way `chrnx_show_edit_form_fields` is. Check `inc/release-meta.php` for the `{$taxonomy}_edit_form_fields` dispatcher and confirm it covers `chrnx_project`; if it enumerates taxonomies explicitly, add `chrnx_project` to that list.
Resolved before dispatch, no theme code needed. `{$taxonomy}_edit_form_fields` is a WordPress core hook fired by `wp-admin/edit-tag-form.php`, which is why `inc/show-meta.php` hooks `chrnx_show_edit_form_fields` without any dispatcher of its own. Hooking `chrnx_project_edit_form_fields` is enough. Confirm the fields appear by loading `/wp-admin/term.php?taxonomy=chrnx_project&tag_ID=<id>`.
- [ ] **Step 5: Run the tests to verify they pass**
@@ -546,7 +546,7 @@ if ( is_wp_error( $chrnx_terms ) || empty( $chrnx_terms ) ) {
<?php if ( ! is_wp_error( $chrnx_link ) ) : ?>
</a>
<?php endif; ?>
<?php echo chrnx_get_platform_links_markup( $chrnx_links, 'chrnx-platform-links' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo chrnx_get_platform_links_markup( $chrnx_links, 'chrnx-platform-links', chrnx_get_project_link_slots() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</article>
<?php endforeach; ?>
</div>
@@ -554,7 +554,7 @@ if ( is_wp_error( $chrnx_terms ) || empty( $chrnx_terms ) ) {
- [ ] **Step 5: Confirm the icon lookup**
`chrnx_get_platform_links_markup()` resolves icons by slot key. Read its definition in `inc/release-meta.php` and confirm it accepts the project slots (`repo`, `package`, `site`). If it looks icons up from `chrnx_get_release_platforms()`, extend it to take an explicit slot-definition array and pass `chrnx_get_project_link_slots()`.
Resolved before dispatch, no change needed to the helper. `chrnx_get_platform_links_markup( array $links, $class_name, $platforms = null )` at `inc/release-meta.php:120` already takes an explicit slot-definition array as its third argument and falls back to `chrnx_get_release_platforms()` only when that argument is omitted. Its loop skips any slot missing from `$platforms`, so omitting the third argument would silently render no links at all for projects. The render code above passes `chrnx_get_project_link_slots()` explicitly. Verify that argument is present.
- [ ] **Step 6: Run the tests to verify they pass**