Advertisement
geminilabs

Untitled

Apr 5th, 2023
887
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. /**
  2.  * @param array $fields
  3.  * @return array
  4.  */
  5. add_filter('site-reviews/review-form/fields', function ($fields) {
  6.     foreach ($fields as $key => &$field) {
  7.         $name = $field['name'] ?? '';
  8.         if ('terms' === $key || 'terms' === $name) {
  9.             $field['checked'] = true;
  10.         }
  11.     }
  12.     return $fields;
  13. }, 20);
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement