Skip to content

Commit 0a45c8d

Browse files
rpgmemclaude
andauthored
docs: TOC fix + recruitment/audience shortcodes (D1) (#415)
* docs: link REST API section in TOC + document recruitment/audience shortcodes (D1) In-plugin documentation refresh, part 1: - Add the section-19 "REST API Authentication" link to the Documentation TOC — the partial was loaded but had no nav entry, so it was invisible. - 01-shortcodes: document [ffc_recruitment_queue] (notice + adjutancy attrs, ?q/?adjutancy/?subscription/?page_* URL filters) and [ffc_recruitment_my_calls], and list the [ffc_audience] attributes (schedule_id / environment_id / view). https://claude.ai/code/session_01BEUEoUQmxb5d7akkVmaSVY * chore: re-trigger CI (Vitest flake on a docs-only PR) https://claude.ai/code/session_01BEUEoUQmxb5d7akkVmaSVY --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f5d0fb8 commit 0a45c8d

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The format follows [Keep a Changelog] (https://keepachangelog.com/en/1.1.0/).
1717

1818
### Changed
1919

20+
- **In-plugin documentation refresh (Settings → Documentation), part 1.** The table of contents now links the REST API Authentication section (19), which existed but was unreachable. The Shortcodes reference gained the two recruitment shortcodes (`[ffc_recruitment_queue notice="…"]` with its `adjutancy` attribute + `?q` / `?adjutancy` / `?subscription` / `?page_*` URL filters, and `[ffc_recruitment_my_calls]`) and now lists the `[ffc_audience]` attributes (`schedule_id`, `environment_id`, `view`).
2021
- **Recruitment editors: the public-column grid and the reason "applies to" group are now toggle switches.** On the notice editor (`page=ffc-recruitment&action=edit-notice`) the public-column visibility checkboxes and on the reason editor (`&tab=reasons&action=edit-reason`) the "applies to" status checkboxes render as `.ffc-toggle` switches. Field names (`public_columns[…]`, `applies_to[]`) and the mandatory-column hidden-input trick are unchanged, so the save handlers behave identically; `ffc-common.css` is now a dependency of the recruitment-admin stylesheet so the switch styles load. Added `AdminUI::get_toggle()` (returns the toggle markup as a string) for the notice renderer, which builds its HTML as a string rather than echoing.
2122
- **User-profile FFC capability fields are now toggle switches.** The ten capability checkboxes on the WordPress user-edit / profile screen (view/download own certificates, book/cancel appointments, scheduling bypass, manage reregistration, edit issued submissions, …) render as `.ffc-toggle` switches for consistency with the rest of the admin. The field names are unchanged, so the save handler and the Grant/Revoke-all bulk JS buttons (which select by `name`) keep working; `ffc-common.css` (the toggle styles) is now enqueued on the profile screen, where it wasn't loaded before.
2223
- **Data Migrations tab: the cleanup/audit cards now have proper padding and the Short URL Cleanup criteria are toggle switches.** The maintenance cards are core `.postbox` elements, but the `.postbox .inside` padding lives in wp-admin's `edit.css`, which isn't loaded on this custom settings page — so their content sat flush against the border (the intro `.card` was unaffected, since it's styled by the plugin's own CSS). Added explicit padding to `.ffc-migration-card`. The three Short URL Cleanup criteria checkboxes (orphaned / never-clicked / trashed) are now `.ffc-toggle` switches for consistency with the rest of the admin; their form field names are unchanged.

includes/settings/views/documentation/01-shortcodes.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,27 @@
6464
<td><code>[ffc_audience]</code></td>
6565
<td>
6666
<?php esc_html_e( 'Displays the audience scheduling calendar for group bookings.', 'ffcertificate' ); ?><br>
67-
<strong><?php esc_html_e( 'Usage:', 'ffcertificate' ); ?></strong> <?php esc_html_e( 'Administrators can schedule activities for audiences (groups) in configured environments.', 'ffcertificate' ); ?>
67+
<strong><?php esc_html_e( 'Usage:', 'ffcertificate' ); ?></strong> <?php esc_html_e( 'Administrators can schedule activities for audiences (groups) in configured environments.', 'ffcertificate' ); ?><br>
68+
<strong><?php esc_html_e( 'Optional attributes:', 'ffcertificate' ); ?></strong>
69+
<code>schedule_id="789"</code> <?php esc_html_e( '(open a specific schedule directly),', 'ffcertificate' ); ?>
70+
<code>environment_id="12"</code> <?php esc_html_e( '(scope to one environment),', 'ffcertificate' ); ?>
71+
<code>view="month"</code> <?php esc_html_e( '(initial calendar view — "month" or "week").', 'ffcertificate' ); ?>
72+
</td>
73+
</tr>
74+
<tr>
75+
<td><code>[ffc_recruitment_queue notice="EDITAL-01"]</code></td>
76+
<td>
77+
<?php esc_html_e( 'Displays the public candidate queue (classification list) for a recruitment notice.', 'ffcertificate' ); ?><br>
78+
<strong><?php esc_html_e( 'Usage:', 'ffcertificate' ); ?></strong> <?php esc_html_e( 'Set "notice" to the notice code. The list shows only the columns marked public in the notice editor, and only while the notice is in a public state (preliminary / definitive); drafts and closed notices are hidden.', 'ffcertificate' ); ?><br>
79+
<strong><?php esc_html_e( 'Optional attribute:', 'ffcertificate' ); ?></strong> <code>adjutancy="sao-paulo"</code> <?php esc_html_e( '(pre-filter to one adjutancy).', 'ffcertificate' ); ?><br>
80+
<strong><?php esc_html_e( 'URL filters:', 'ffcertificate' ); ?></strong> <code>?q=</code> <?php esc_html_e( '(name search),', 'ffcertificate' ); ?> <code>?adjutancy=</code>, <code>?subscription=</code> <?php esc_html_e( '(pcd / geral),', 'ffcertificate' ); ?> <code>?page_top=</code> / <code>?page_bottom=</code> <?php esc_html_e( '(pagination).', 'ffcertificate' ); ?>
81+
</td>
82+
</tr>
83+
<tr>
84+
<td><code>[ffc_recruitment_my_calls]</code></td>
85+
<td>
86+
<?php esc_html_e( 'Shows the logged-in candidate their own call-ups (convocations) across recruitment notices.', 'ffcertificate' ); ?><br>
87+
<strong><?php esc_html_e( 'Usage:', 'ffcertificate' ); ?></strong> <?php esc_html_e( 'Place on a members area page. Candidates are matched by the CPF/RF on their account; no attributes are required.', 'ffcertificate' ); ?>
6888
</td>
6989
</tr>
7090
</tbody>

includes/settings/views/ffc-tab-documentation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<li><a href="#url-shortener" class="ffc-icon-link"><?php esc_html_e( '16. URL Shortener & QR Codes', 'ffcertificate' ); ?></a></li>
4040
<li><a href="#hooks" class="ffc-icon-wrench"><?php esc_html_e( '17. Developer Hooks', 'ffcertificate' ); ?></a></li>
4141
<li><a href="#troubleshooting" class="ffc-icon-wrench"><?php esc_html_e( '18. Troubleshooting', 'ffcertificate' ); ?></a></li>
42+
<li><a href="#rest-api-auth" class="ffc-icon-lock"><?php esc_html_e( '19. REST API Authentication', 'ffcertificate' ); ?></a></li>
4243
</ul>
4344
</div>
4445
</div>

0 commit comments

Comments
 (0)