Skip to content

Commit

Permalink
Update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Jan 8, 2025
1 parent 000d64b commit 094d833
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ public function run( Check_Result $result ) {
6
);
} else {
$valid_chars_count = preg_match_all( '/[a-z0-9-]/i', $plugin_header['Name'] );
$valid_chars_count = preg_match_all( '/[a-z0-9]/i', $plugin_header['Name'] );

if ( intval( $valid_chars_count ) < 5 ) {
$this->add_result_error_for_file(
$result,
sprintf(
/* translators: %s: plugin header field */
__( 'The "%s" header in the plugin file is not valid. It may only contain latin letters (A-z), numbers, spaces, and hyphens.', 'plugin-check' ),
__( 'The "%s" header in the plugin file is not valid. It needs to contain at least 5 latin letters (a-Z) and/or numbers. This is necessary because the initial plugin slug is generated from the name.', 'plugin-check' ),
esc_html( $labels['Name'] )
),
'plugin_header_unsupported_plugin_name',
Expand Down

0 comments on commit 094d833

Please sign in to comment.