Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions WordPress-VIP-Go/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ function foo_bar_foo() {
}

// WordPressVIPMinimum.UserExperience.AdminBarRemoval
add_filter( 'show_admin_bar', '__return_false' ); // Error.
add_filter( 'show_admin_bar', '__return_false' ); // Warning.
add_filter( 'show_admin_bar', '__return_true' ); // Ok.
show_admin_bar( false ); // Error.
show_admin_bar( false ); // Warning.
show_admin_bar( true ); // Ok.
add_filter( 'show_admin_bar', 'my_own_return_false' ); // Error.
add_filter( 'show_admin_bar', 'my_own_return_false' ); // Warning.
echo '<style type="text/css">
#wpadminbar {
visibility: hidden; /* Error. */
Expand All @@ -232,19 +232,19 @@ echo '<style type="text/css">
</style>';
?> <style type="text/css">
#wpadminbar {
visibility: hidden; /* Error. */
display: none; /* Error. */
opacity: 0; /* Error. */
visibility: hidden; /* Warning. */
display: none; /* Warning. */
opacity: 0; /* Warning. */
}
#not-wpadminbar {
visibility: hidden; /* OK. */
display: none; /* OK. */
opacity: 0; /* OK. */
}
.show-admin-bar {
visibility: hidden; /* Error. */
display: none; /* Error. */
opacity: 0; /* Error. */
visibility: hidden; /* Warning. */
display: none; /* Warning. */
opacity: 0; /* Warning. */
}
</style> <?php

Expand Down
24 changes: 12 additions & 12 deletions WordPress-VIP-Go/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@
181 => 1,
187 => 1,
188 => 1,
221 => 1,
223 => 1,
225 => 1,
228 => 1,
229 => 1,
230 => 1,
235 => 1,
236 => 1,
237 => 1,
245 => 1,
246 => 1,
247 => 1,
252 => 1,
255 => 1,
256 => 1,
Expand Down Expand Up @@ -197,6 +185,18 @@
208 => 1,
212 => 1,
217 => 1,
221 => 1,
223 => 1,
225 => 1,
228 => 1,
229 => 1,
230 => 1,
235 => 1,
236 => 1,
237 => 1,
245 => 1,
246 => 1,
247 => 1,
265 => 1,
269 => 1,
273 => 1,
Expand Down
10 changes: 10 additions & 0 deletions WordPress-VIP-Go/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@
<severity>6</severity>
<message>File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://wpvip.com/documentation/vip-go/writing-files-on-vip-go/</message>
</rule>
<rule ref="WordPressVIPMinimum.UserExperience.AdminBarRemoval.RemovalDetected">
<type>warning</type>
<severity>6</severity>
<message>Removal of admin bar is highly discouraged for user roles of "administrator" and "vip_support" -- if these roles are already excluded, this warning can be ignored.</message>
</rule>
<rule ref="WordPressVIPMinimum.UserExperience.AdminBarRemoval.HidingDetected">
<type>warning</type>
<severity>6</severity>
<message>Hiding of admin bar is highly discouraged for user roles of "administrator" and "vip_support" -- if these roles are already excluded, this warning can be ignored.</message>
</rule>
<rule ref="WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie">
<type>error</type>
<severity>6</severity>
Expand Down