diff --git a/WordPress-VIP-Go/ruleset-test.inc b/WordPress-VIP-Go/ruleset-test.inc index 876a9c6d..61e56955 100644 --- a/WordPress-VIP-Go/ruleset-test.inc +++ b/WordPress-VIP-Go/ruleset-test.inc @@ -111,8 +111,8 @@ filter_var_array( $array, FILTER_SANITIZE_STRING ); // Ok. filter_input_array( $array,FILTER_SANITIZE_STRING ); // Ok. filter_input( INPUT_GET, 'foo', FILTER_DEFAULT ); // Warning. -// WordPressVIPMinimum.Functions.RestrictedFunctions.dbDelta_dbdelta -dbDelta( $query, true ); // Warning. + + // WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_wp_mail wp_mail(); // Warning. diff --git a/WordPress-VIP-Go/ruleset-test.php b/WordPress-VIP-Go/ruleset-test.php index 6bca6c91..af455144 100644 --- a/WordPress-VIP-Go/ruleset-test.php +++ b/WordPress-VIP-Go/ruleset-test.php @@ -147,7 +147,6 @@ 108 => 1, 109 => 1, 112 => 1, - 115 => 1, 118 => 1, 119 => 1, 123 => 1, diff --git a/WordPress-VIP-Go/ruleset.xml b/WordPress-VIP-Go/ruleset.xml index 0b144b3f..e4297a51 100644 --- a/WordPress-VIP-Go/ruleset.xml +++ b/WordPress-VIP-Go/ruleset.xml @@ -132,10 +132,6 @@ 10 - - warning - 7 - 7 diff --git a/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php b/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php index 9893c1b3..8f3bba86 100644 --- a/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php +++ b/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php @@ -74,13 +74,6 @@ public function getGroups() { 'attachment_url_to_postid', ], ], - 'dbDelta' => [ - 'type' => 'error', - 'message' => 'All database modifications have to approved by the WordPress.com VIP team.', - 'functions' => [ - 'dbDelta', - ], - ], // @link https://docs.wpvip.com/technical-references/code-review/vip-notices/#h-switch_to_blog 'switch_to_blog' => [ 'type' => 'warning', diff --git a/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.inc b/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.inc index fece7131..3e65ae90 100644 --- a/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.inc +++ b/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.inc @@ -49,8 +49,8 @@ flush_rules(); // Ok - not in global class. $wp_write->flush_rules(); // Ok - not in global class $wp_rewrite. $wp_rewrite->flush_rules(); // Error. -db_delta(); // Ok - similarly-named function to dbDelta(). -dbDelta(); // Error. + + switch_blog(); // Ok - similarly-named function to switch_to_blog(). switch_to_blog( $blogid ); // Warning. diff --git a/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.php b/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.php index e907eae3..877f51b7 100644 --- a/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.php +++ b/WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.php @@ -37,7 +37,6 @@ public function getErrorList() { 43 => 1, 46 => 1, 50 => 1, - 53 => 1, 59 => 1, 62 => 1, 75 => 1, diff --git a/WordPressVIPMinimum/ruleset-test.inc b/WordPressVIPMinimum/ruleset-test.inc index 5c89e02a..803e890f 100644 --- a/WordPressVIPMinimum/ruleset-test.inc +++ b/WordPressVIPMinimum/ruleset-test.inc @@ -320,7 +320,7 @@ wpcom_vip_irc(); // Error. flush_rewrite_rules(); // Error. $wp_rewrite->flush_rules(); // Error. attachment_url_to_postid( $url ); // Error. -dbDelta(); // Error. + switch_to_blog( $blogid ); // Warning. get_page_by_title( $page_title ); // Error. url_to_postid( $url ); // Error. diff --git a/WordPressVIPMinimum/ruleset-test.php b/WordPressVIPMinimum/ruleset-test.php index 8320825c..19d74bf1 100644 --- a/WordPressVIPMinimum/ruleset-test.php +++ b/WordPressVIPMinimum/ruleset-test.php @@ -92,7 +92,6 @@ 320 => 1, 321 => 1, 322 => 1, - 323 => 1, 325 => 1, 326 => 1, 327 => 1,