Added: suggested content for Privacy Policy#299
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds ChangesPrivacy Policy Integration
sequenceDiagram
participant Plugin as Plugin (admin)
participant Policy as Admin\PrivacyPolicy
participant WP as WordPress Core
Plugin->>Policy: instantiate on register_services()
Policy->>WP: add_action('admin_init', add_suggested_content)
WP->>Policy: trigger admin_init (admin visits)
Policy->>WP: call wp_add_privacy_policy_content('Plausible Analytics', $html)
WP-->>Policy: register suggested content
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 PHPStan (2.1.54)PHPStan was skipped because the sandbox runner could not parse its output. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
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 `@src/Admin/PrivacyPolicy.php`:
- Around line 41-48: The sprintf() call that appends the Plausible data-policy
URL to $content should output a clickable link and include a translators
comment: replace the bare URL placeholder value with an anchor tag string (e.g.,
'<a
href="https://plausible.io/data-policy">https://plausible.io/data-policy</a>')
so the rendered page shows a clickable link, and add a preceding /* translators:
*/ comment for the __() string containing the %s placeholder to satisfy WP i18n
tooling; update the line that calls sprintf( __( ... ),
'https://plausible.io/data-policy' ) in PrivacyPolicy.php accordingly
(wp_kses_post() already permits anchors so no downstream changes needed).
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a7350383-2cb4-4371-ac63-21bdc4382c25
📒 Files selected for processing (2)
src/Admin/PrivacyPolicy.phpsrc/Plugin.php
…ng translator comment
Addresses #164
Summary by CodeRabbit