Skip to content

Commit

Permalink
Merge pull request #514 from WordPress/fix/prepare-102
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Jul 9, 2024
2 parents 8ffd566 + 5f09a6c commit 67ee2ba
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
12 changes: 6 additions & 6 deletions includes/Checker/Checks/Plugin_Readme_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private function check_license( Check_Result $result, string $readme_file, Parse

return;
} else {
$license = $this->normalice_licenses( $license );
$license = $this->normalize_licenses( $license );
}

// Test for a valid SPDX license identifier.
Expand All @@ -264,7 +264,7 @@ private function check_license( Check_Result $result, string $readme_file, Parse
$plugin_main_file
);
} else {
$plugin_license = $this->normalice_licenses( $matches_license[1] );
$plugin_license = $this->normalize_licenses( $matches_license[1] );
}

// Checks for a valid license in Plugin Header.
Expand All @@ -289,14 +289,14 @@ private function check_license( Check_Result $result, string $readme_file, Parse
}

/**
* Normalice licenses to compare them.
* Normalize licenses to compare them.
*
* @param string $license The license to normalice.
* @since 1.1.0
* @since 1.0.2
*
* @param string $license The license to normalize.
* @return string
*/
private function normalice_licenses( $license ) {
private function normalize_licenses( $license ) {
$license = trim( $license );
$license = str_replace( ' ', ' ', $license );

Expand Down
1 change: 1 addition & 0 deletions includes/Checker/Default_Check_Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ private function register_default_checks() {
'enqueued_resources' => new Checks\Enqueued_Resources_Check(),
'plugin_readme' => new Checks\Plugin_Readme_Check(),
'enqueued_styles_scope' => new Checks\Enqueued_Styles_Scope_Check(),
'enqueued_scripts_scope' => new Checks\Enqueued_Scripts_Scope_Check(),
'localhost' => new Checks\Localhost_Check(),
'no_unfiltered_uploads' => new Checks\No_Unfiltered_Uploads_Check(),
'trademarks' => new Checks\Trademarks_Check(),
Expand Down
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
=== Plugin Check (PCP) ===

Contributors: wordpressdotorg
Requires at least: 6.3
Tested up to: 6.5
Stable tag: 1.0.1
Tested up to: 6.6
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: plugin best practices, testing, accessibility, performance, security
Expand Down Expand Up @@ -70,6 +69,10 @@ In any case, passing the checks in this tool likely helps to achieve a smooth pl

= 1.0.2 =

* Feature - New `Enqueued_Scripts_Scope_Check` (`enqueued_scripts_scope`), `Enqueued_Styles_Size_Check` (`enqueued_styles_size`) and `Enqueued_Resources_Check` (`enqueued_resources`) performance checks.
* Enhancement - Improved readme check and added a new `wp_plugin_check_ignored_readme_warnings` filter.
* Enhancement - New `wp_plugin_check_default_categories` filter to change the categories which are selected by default.
* Enhancement - New `wp_plugin_check_ignore_files` filter to allow ignoring specific files.
* Fix - Correct detection of readme files in Windows by normalizing file paths.

= 1.0.1 =
Expand Down

0 comments on commit 67ee2ba

Please sign in to comment.