Skip to content

Make invalid check slug warning translatable#1345

Open
MarkPra wants to merge 7 commits into
WordPress:trunkfrom
MarkPra:pr/470
Open

Make invalid check slug warning translatable#1345
MarkPra wants to merge 7 commits into
WordPress:trunkfrom
MarkPra:pr/470

Conversation

@MarkPra

@MarkPra MarkPra commented Jun 4, 2026

Copy link
Copy Markdown

What?

Fixes PR #470.
Makes the invalid check slug warning translatable and escapes the dynamic slug value before output.

Why?

The warning message was previously output as a hardcoded English string and included the slug directly in the echoed output. This caused the sentence to not be translatable and the dynamic slug value to not be escaped.

How?

Replaced the concatenated "echo" statement with "printf()" using "esc_html__()" for the translatable message and "esc_html()" for the slug placeholder value.

alewolf and others added 7 commits June 13, 2024 14:49
A function return_valid_check_slugs() has been added to the file Abstract_Check_Runner.php to filter out any non-existent checks from the $check_slugs array. It also echos a warning if a slug from the passed array does not exist. This enhancement is reflected in the WP CLI --checks argument as noted in the readme documentation.
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @MarkPra.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: MarkPra.

Co-authored-by: alewolf <alekv@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

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.

2 participants