Skip to content

Commit

Permalink
Merge branch 'trunk' into chore/1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar authored Nov 29, 2024
2 parents 53de9f8 + 3488cb0 commit 7e7315b
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,20 @@ public function run( Check_Result $result ) {
'',
6
);
} elseif ( str_contains( $plugin_header['PluginURI'], '//wordpress.org/' ) || str_contains( $plugin_header['PluginURI'], '//example.com/' ) ) {
} elseif ( preg_match( '/\/\/(example\.com|example\.net|example\.org)\//', $plugin_header['PluginURI'], $matches ) ) {
$this->add_result_warning_for_file(
$result,
sprintf(
/* translators: %s: plugin header field */
__( 'The "%s" header in the plugin file is not valid.', 'plugin-check' ),
esc_html( $labels['PluginURI'] )
/* translators: 1: plugin header field, 2: domain */
__( 'The "%1$s" header in the plugin file is not valid. Discouraged domain "%2$s" found. This is the homepage of the plugin, which should be a unique URL, preferably on your own website. ', 'plugin-check' ),
esc_html( $labels['PluginURI'] ),
esc_html( $matches[1] ),
),
'plugin_header_invalid_plugin_uri_domain',
$plugin_main_file,
0,
0,
'',
'https://developer.wordpress.org/plugins/plugin-basics/header-requirements/#header-fields',
6
);
}
Expand Down

0 comments on commit 7e7315b

Please sign in to comment.