Skip to content

Commit e45151b

Browse files
committed
Remove plugin_header_same_plugin_author_uri check
1 parent 21755bf commit e45151b

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

includes/Checker/Checks/Plugin_Repo/Plugin_Header_Fields_Check.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -223,29 +223,6 @@ public function run( Check_Result $result ) {
223223
}
224224
}
225225

226-
if ( ! empty( $plugin_header['PluginURI'] ) && ! empty( $plugin_header['AuthorURI'] ) ) {
227-
$plugin_uri = rtrim( strtolower( $plugin_header['PluginURI'] ), '/' );
228-
$author_uri = rtrim( strtolower( $plugin_header['AuthorURI'] ), '/' );
229-
230-
if ( $plugin_uri === $author_uri ) {
231-
$this->add_result_error_for_file(
232-
$result,
233-
sprintf(
234-
/* translators: 1: plugin uri header field, 2: author uri header field */
235-
__( 'The "%1$s" and "%2$s" header in the plugin file must be different. It is not required to provide both, so pick the one that best applies to your situation.', 'plugin-check' ),
236-
esc_html( $labels['PluginURI'] ),
237-
esc_html( $labels['AuthorURI'] )
238-
),
239-
'plugin_header_same_plugin_author_uri',
240-
$plugin_main_file,
241-
0,
242-
0,
243-
__( 'https://developer.wordpress.org/plugins/plugin-basics/header-requirements/', 'plugin-check' ),
244-
7
245-
);
246-
}
247-
}
248-
249226
if ( ! empty( $plugin_header['Network'] ) ) {
250227
if ( 'true' !== strtolower( $plugin_header['Network'] ) ) {
251228
$this->add_result_warning_for_file(

tests/phpunit/testdata/plugins/test-plugin-late-escaping-errors/load.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Requires PHP: 5.6
77
* Version: 1.0.0 Beta
88
* Author: WordPress Performance Team
9-
* Author URI: https://github.com/wordpress/plugin-check/
9+
* Author URI: https://make.wordpress.org/performance/
1010
* License: GPLv2 or later
1111
* License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
1212
* Text Domain: test-plugin-check-errors

tests/phpunit/tests/Checker/Checks/Plugin_Header_Fields_Check_Tests.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,5 @@ public function test_run_with_invalid_header_fields() {
8888

8989
$this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_missing_plugin_description' ) ) );
9090
$this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_invalid_plugin_version' ) ) );
91-
$this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_same_plugin_author_uri' ) ) );
9291
}
9392
}

0 commit comments

Comments
 (0)