@@ -83,7 +83,7 @@ public function run( Check_Result $result ) {
8383
8484 if ( ! empty ( $ plugin_header ['Name ' ] ) ) {
8585 if ( in_array ( $ plugin_header ['Name ' ], array ( 'Plugin Name ' , 'My Basics Plugin ' ), true ) ) {
86- $ this ->add_result_warning_for_file (
86+ $ this ->add_result_error_for_file (
8787 $ result ,
8888 sprintf (
8989 /* translators: %s: plugin header field */
@@ -95,7 +95,7 @@ public function run( Check_Result $result ) {
9595 0 ,
9696 0 ,
9797 '' ,
98- 6
98+ 7
9999 );
100100 } else {
101101 $ valid_chars_count = preg_match_all ( '/[a-z0-9]/i ' , $ plugin_header ['Name ' ] );
@@ -121,7 +121,7 @@ public function run( Check_Result $result ) {
121121
122122 if ( ! empty ( $ plugin_header ['PluginURI ' ] ) ) {
123123 if ( true !== $ this ->is_valid_url ( $ plugin_header ['PluginURI ' ] ) ) {
124- $ this ->add_result_warning_for_file (
124+ $ this ->add_result_error_for_file (
125125 $ result ,
126126 sprintf (
127127 /* translators: %s: plugin header field */
@@ -132,11 +132,11 @@ public function run( Check_Result $result ) {
132132 $ plugin_main_file ,
133133 0 ,
134134 0 ,
135- '' ,
136- 6
135+ 'https://developer.wordpress.org/plugins/plugin-basics/header-requirements/#header-fields ' ,
136+ 7
137137 );
138138 } elseif ( preg_match ( '/\/\/(example\.com|example\.net|example\.org)\// ' , $ plugin_header ['PluginURI ' ], $ matches ) ) {
139- $ this ->add_result_warning_for_file (
139+ $ this ->add_result_error_for_file (
140140 $ result ,
141141 sprintf (
142142 /* translators: 1: plugin header field, 2: domain */
@@ -149,7 +149,7 @@ public function run( Check_Result $result ) {
149149 0 ,
150150 0 ,
151151 'https://developer.wordpress.org/plugins/plugin-basics/header-requirements/#header-fields ' ,
152- 6
152+ 7
153153 );
154154 }
155155 }
@@ -175,7 +175,7 @@ public function run( Check_Result $result ) {
175175 || str_contains ( $ plugin_header ['Description ' ], 'Here is a short description of the plugin ' )
176176 || str_contains ( $ plugin_header ['Description ' ], 'Handle the basics with this plugin ' )
177177 ) {
178- $ this ->add_result_warning_for_file (
178+ $ this ->add_result_error_for_file (
179179 $ result ,
180180 sprintf (
181181 /* translators: %s: plugin header field */
@@ -186,8 +186,8 @@ public function run( Check_Result $result ) {
186186 $ plugin_main_file ,
187187 0 ,
188188 0 ,
189- '' ,
190- 6
189+ 'https://developer.wordpress.org/plugins/plugin-basics/header-requirements/#header-fields ' ,
190+ 7
191191 );
192192 }
193193 }
@@ -239,15 +239,15 @@ public function run( Check_Result $result ) {
239239 $ plugin_main_file ,
240240 0 ,
241241 0 ,
242- '' ,
242+ 'https://developer.wordpress.org/plugins/plugin-basics/header-requirements/#header-fields ' ,
243243 7
244244 );
245245 }
246246 }
247247
248248 if ( ! empty ( $ plugin_header ['Network ' ] ) ) {
249249 if ( 'true ' !== strtolower ( $ plugin_header ['Network ' ] ) ) {
250- $ this ->add_result_warning_for_file (
250+ $ this ->add_result_error_for_file (
251251 $ result ,
252252 sprintf (
253253 /* translators: %s: plugin header field */
@@ -259,7 +259,7 @@ public function run( Check_Result $result ) {
259259 0 ,
260260 0 ,
261261 'https://developer.wordpress.org/plugins/plugin-basics/header-requirements/#header-fields ' ,
262- 6
262+ 7
263263 );
264264 }
265265 }
0 commit comments