diff --git a/WordPress-VIP-Go/ruleset.xml b/WordPress-VIP-Go/ruleset.xml index 8faa91f0..52ea12db 100644 --- a/WordPress-VIP-Go/ruleset.xml +++ b/WordPress-VIP-Go/ruleset.xml @@ -279,15 +279,6 @@ 0 - - 0 - - - 0 - - - 0 - 0 diff --git a/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php b/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php index 2d8d8ac5..d12ec448 100644 --- a/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php +++ b/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php @@ -254,15 +254,6 @@ public function getGroups() { 'lchown', ], ], - 'site_option' => [ - 'type' => 'error', - 'message' => '%s() will overwrite network option values, please use the `*_option()` equivalent instead (e.g. `update_option()`).', - 'functions' => [ - 'add_site_option', - 'update_site_option', - 'delete_site_option', - ], - ], 'stats_get_csv' => [ 'type' => 'error', 'message' => 'Using `%s` outside of Jetpack context pollutes the stats_cache entry in the wp_options table. We recommend building a custom function instead.', diff --git a/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.inc b/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.inc index 79e3569a..c1b6e6d1 100644 --- a/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.inc +++ b/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.inc @@ -215,12 +215,12 @@ $c->create_function = 'bar' . ( 1 === 1 ?? 'foo' ); // Ok. $wp_random_testing = create_function2( '$a, $b', 'return ( $b / $a ); '); // Ok. $wp_random_testing = create_function3( '$a, $b', 'return ( $b / $a ); '); // Ok. -add_site_option( $foo, 'bar' ); // Warning. -add_option( $foo, 'bar' ); // Ok. -update_site_option( $bar, 'foo' ); // Warning. -update_option( 'foo', $bar ); // Ok. -delete_site_option( $foo ); // Warning. -delete_option( $bar ); // Ok. + + + + + + wpcom_vip_get_page_by_path(); // Ok - VIP recommended version of get_page_by_path(). get_page_by_path( $page_path ); // Warning. diff --git a/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.php b/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.php index ada3fd5e..ab1e3334 100644 --- a/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.php +++ b/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.php @@ -109,9 +109,6 @@ public function getErrorList() { 198 => 1, 199 => 1, 200 => 1, - 218 => 1, - 220 => 1, - 222 => 1, 228 => 1, ]; } diff --git a/WordPressVIPMinimum/ruleset-test.inc b/WordPressVIPMinimum/ruleset-test.inc index 3dde264b..9c25a9f9 100644 --- a/WordPressVIPMinimum/ruleset-test.inc +++ b/WordPressVIPMinimum/ruleset-test.inc @@ -390,9 +390,9 @@ chown(); // Error. chmod(); // Error. lchgrp(); // Error. lchown(); // Error. -add_site_option( 'foo', $bar ); // Error. -update_site_option( $bar, $foo, true ); // Error. -delete_site_option( $foo ); // Error. + + + wp_mail(); // Warning. mail(); // Warning. is_multi_author(); // Warning. diff --git a/WordPressVIPMinimum/ruleset-test.php b/WordPressVIPMinimum/ruleset-test.php index 45f428a8..6f9b8291 100644 --- a/WordPressVIPMinimum/ruleset-test.php +++ b/WordPressVIPMinimum/ruleset-test.php @@ -161,9 +161,6 @@ 390 => 1, 391 => 1, 392 => 1, - 393 => 1, - 394 => 1, - 395 => 1, 402 => 1, 415 => 1, 425 => 1,