Skip to content

Settings first in menu + plugin row links#6

Closed
r00bbert wants to merge 2 commits into
mainfrom
feat/settings-additions
Closed

Settings first in menu + plugin row links#6
r00bbert wants to merge 2 commits into
mainfrom
feat/settings-additions

Conversation

@r00bbert
Copy link
Copy Markdown
Collaborator

@r00bbert r00bbert commented May 11, 2026

Two small admin UX bits.

Settings now sits at the top of the OpenTrust submenu, above the CPTs. Top-level click still opens it (was already the case).

On the Plugins screen, the OpenTrust row now has Settings and Docs links next to Deactivate. Docs points to plugins.ettic.nl/docs/opentrust.

Summary by CodeRabbit

  • New Features

    • Added quick-access action links on the plugins page for Settings and Documentation, and ensured the Settings link appears above other submenu items for faster access.
  • Localization

    • Refreshed translation template and updated admin-facing strings (navigation labels, upload UI text, citation prompts, and permalinks guidance) for clearer messaging.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 921f497a-e17d-4aea-be52-6d93c3e30c4a

📥 Commits

Reviewing files that changed from the base of the PR and between 49c4e5c and ea0931a.

📒 Files selected for processing (1)
  • languages/opentrust.pot

📝 Walkthrough

Walkthrough

Constructor registers a plugin_action_links_ filter wired to OpenTrust_Admin::add_plugin_action_links(), which prepends "Settings" and external "Docs" links. The Settings submenu is registered with priority 0. The POT template is updated with new admin-facing strings.

Changes

Plugin Action Links

Layer / File(s) Summary
Filter Hook Registration
includes/class-opentrust-admin.php
Constructor adds plugin_action_links_... filter callback to add_plugin_action_links() for the plugins listing page.
Submenu Priority
includes/class-opentrust-admin.php
Settings submenu registration now includes priority argument (0) to control ordering relative to other submenus.
Action Links Callback
includes/class-opentrust-admin.php
New add_plugin_action_links() method prepends "Settings" and external "Docs" links (with noopener noreferrer) to the provided links array and returns it.
i18n / POT Update
languages/opentrust.pot
POT header refreshed and admin-facing strings added/updated (navigation labels, upload UI texts, permalinks guidance).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A Settings link hops into view,
With Docs beside, all fresh and new,
Priority zero keeps them first and true,
The plugins page now shines—thank you! 🐰✨

🚥 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 concisely summarizes the main changes: adding plugin row links (Settings and Docs) and positioning Settings at the top of the 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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/settings-additions

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

@r00bbert r00bbert added the enhancement New feature or request label May 11, 2026
@r00bbert r00bbert requested a review from nolderoos May 11, 2026 15:20
@nolderoos nolderoos added this to the 1.1.0 milestone May 11, 2026
@r00bbert
Copy link
Copy Markdown
Collaborator Author

Superseded by #30. This branch predates the namespace rename (#28) and edits files that no longer exist on main (class-opentrust-admin.php, opentrust.pot), so it can't be merged. #30 re-applies the same two tweaks (Settings/Docs row links + Settings pinned first) onto the current admin class.

@r00bbert r00bbert closed this May 21, 2026
r00bbert added a commit that referenced this pull request May 21, 2026
Re-applies the two admin tweaks from #6 onto the post-rename admin class: Settings/Docs links on the Plugins row, and Settings submenu pinned to position 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants