Skip to content

Admin: Settings/Docs plugin row links + pin Settings first#30

Merged
r00bbert merged 1 commit into
mainfrom
feat/settings-menu-row-links
May 21, 2026
Merged

Admin: Settings/Docs plugin row links + pin Settings first#30
r00bbert merged 1 commit into
mainfrom
feat/settings-menu-row-links

Conversation

@r00bbert
Copy link
Copy Markdown
Collaborator

@r00bbert r00bbert commented May 21, 2026

Supersedes #6, which was branched pre-rename and edits files the rename deleted (class-opentrust-admin.php, opentrust.pot), so it can no longer merge. This re-applies the same two tweaks onto the current class-ettic-otc-admin.php:

  • Plugins-page action links — prepends Settings and Docs links to the plugin's row on the WP Plugins screen.
  • Settings submenu pinned to position 0 — keeps Settings above the CPT submenus injected via show_in_menu.

Docs link URL is carried over unchanged from #6.

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Settings and Docs links to the plugin actions menu for convenient access to configuration and documentation.
  • Localization

    • Updated translation catalogs with new strings for Trust Center navigation and Docs functionality.

Review Change Stack

Re-applies feat/settings-additions (PR #6) onto post-rename admin class.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

This PR adds custom plugin row action links (Settings and Docs) to the WordPress admin plugins page, adjusts the Settings submenu positioning to appear above CPT submenus, and updates translation catalogs to reflect the new and modified UI strings.

Changes

Plugin action links and menu positioning

Layer / File(s) Summary
Plugin action links filter and submenu positioning
includes/class-ettic-otc-admin.php
Registers plugin_action_links_{plugin_basename} filter on construction, adjusts Settings submenu registration with explicit positioning argument (0), and implements add_plugin_action_links() method to prepend "Settings" (linking to admin.php?page=ettic-otc) and "Docs" (linking to plugin docs site) to the existing plugin action links array.
Translation catalog updates
languages/open-trust-center-by-ettic.pot, languages/open-trust-center-by-ettic-nl_NL.po
POT template and Dutch translation files updated with new Trust Center and Docs navigation labels, updated #: source line references in includes/class-ettic-otc-admin.php for admin UI strings, badge/proof upload actions, and pretty permalinks requirement messages.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A rabbit hops through menus bright,
Settings and Docs now in sight,
Plugin links dance in perfect row,
Languages shift where changes flow. 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main changes: adding Settings/Docs plugin row action links and pinning the Settings submenu first in the admin menu.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/settings-menu-row-links

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@languages/open-trust-center-by-ettic-nl_NL.po`:
- Around line 1092-1094: The Dutch translation for the new "Docs" admin label is
missing (msgid "Docs") in languages/open-trust-center-by-ettic-nl_NL.po; add the
appropriate Dutch string to msgstr (e.g., "Documentatie" or preferred term) so
nl_NL users see the localized label; this message is used from
includes/class-ettic-otc-admin.php (reference at line where __("Docs") is
registered) so update msgstr for msgid "Docs" accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c27ca320-7062-47a6-a2b3-19e4b6f2dfff

📥 Commits

Reviewing files that changed from the base of the PR and between a3b6c3f and bc42ca3.

📒 Files selected for processing (3)
  • includes/class-ettic-otc-admin.php
  • languages/open-trust-center-by-ettic-nl_NL.po
  • languages/open-trust-center-by-ettic.pot

Comment on lines +1092 to +1094
#: includes/class-ettic-otc-admin.php:104
msgid "Docs"
msgstr ""
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add Dutch translation for the new “Docs” label.

msgstr is empty for the new string, so nl_NL users will see the English label in the plugin row.

💡 Proposed fix
 #: includes/class-ettic-otc-admin.php:104
 msgid "Docs"
-msgstr ""
+msgstr "Documentatie"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#: includes/class-ettic-otc-admin.php:104
msgid "Docs"
msgstr ""
#: includes/class-ettic-otc-admin.php:104
msgid "Docs"
msgstr "Documentatie"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@languages/open-trust-center-by-ettic-nl_NL.po` around lines 1092 - 1094, The
Dutch translation for the new "Docs" admin label is missing (msgid "Docs") in
languages/open-trust-center-by-ettic-nl_NL.po; add the appropriate Dutch string
to msgstr (e.g., "Documentatie" or preferred term) so nl_NL users see the
localized label; this message is used from includes/class-ettic-otc-admin.php
(reference at line where __("Docs") is registered) so update msgstr for msgid
"Docs" accordingly.

@r00bbert r00bbert merged commit af18711 into main May 21, 2026
11 checks passed
@r00bbert r00bbert deleted the feat/settings-menu-row-links branch May 21, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant