Skip to content

fix: resolve NonSingularStringLiteral errors#302

Open
masteradhoc wants to merge 1 commit into
plausible:developfrom
masteradhoc:NonSingularStringLiteralContext
Open

fix: resolve NonSingularStringLiteral errors#302
masteradhoc wants to merge 1 commit into
plausible:developfrom
masteradhoc:NonSingularStringLiteralContext

Conversation

@masteradhoc
Copy link
Copy Markdown

Resolves PHPCS WordPress.WP.I18n violations where dynamic values were incorrectly passed to translation functions.

InitOptions.php

  • Removed redundant __() wrapper from the context argument of _x() — the context must be a plain string literal, not a translated string.

API.php

  • Replaced esc_attr_e( $var, 'domain' ) and esc_html_e( $var, 'domain' ) with echo esc_attr( $var ) / echo esc_html( $var ) for values that are not translatable (HTML element IDs, slugs, and computed strings like implode()).

No functional changes — output is identical.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

Warning

Rate limit exceeded

@masteradhoc has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 30 minutes and 28 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d2bd2eb6-f809-4aba-bb79-8fc0a8be5b4e

📥 Commits

Reviewing files that changed from the base of the PR and between c2fc480 and 3f33ddd.

📒 Files selected for processing (2)
  • src/Admin/Settings/API.php
  • src/InitOptions.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

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