Skip to content

Commit

Permalink
Merge pull request #812 from Automattic/fix/remove-term-exists-error
Browse files Browse the repository at this point in the history
End restricting usage of term_exists()
  • Loading branch information
rebeccahum authored Feb 16, 2024
2 parents b8a8877 + cd82f3e commit f2a6b2e
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion WordPress-VIP-Go/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ wpcom_vip_irc(); // Error.
flush_rewrite_rules(); // Error.
$wp_rewrite->flush_rules(); // Error.
\add_role(); // Error.
term_exists(); // Error.

count_user_posts(); // Error.
get_intermediate_image_sizes(); // Error.
wp_is_mobile(); // Error.
Expand Down
1 change: 0 additions & 1 deletion WordPress-VIP-Go/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
358 => 1,
359 => 1,
360 => 1,
361 => 1,
362 => 1,
363 => 1,
364 => 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ public function getGroups() {
'add_role',
],
],
'term_exists' => [
'type' => 'error',
'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_term_exists() instead.',
'functions' => [
'term_exists',
],
],
'count_user_posts' => [
'type' => 'error',
'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_count_user_posts() instead.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ add_role( 'test' ); // Error.



wpcom_vip_term_exists(); // Ok - VIP recommended version of term_exists().
term_exists(); // Error.



wpcom_vip_count_user_posts(); // Ok - VIP recommended version of count_user_posts().
count_user_posts(); // Error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function getErrorList() {
62 => 1,
75 => 1,
76 => 1,
88 => 1,
91 => 1,
94 => 1,
97 => 1,
Expand Down
2 changes: 1 addition & 1 deletion WordPressVIPMinimum/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ url_to_postid( $url ); // Error.



term_exists(); // Error.

count_user_posts(); // Error.
wp_old_slug_redirect(); // Error.
get_adjacent_post(); // Error.
Expand Down
1 change: 0 additions & 1 deletion WordPressVIPMinimum/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
325 => 1,
326 => 1,
327 => 1,
332 => 1,
333 => 1,
334 => 1,
335 => 1,
Expand Down

0 comments on commit f2a6b2e

Please sign in to comment.