Advertisement
geminilabs

[site-reviews] Make the terms toggle checked by default

Mar 11th, 2023
883
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. /**
  2.  * Make the terms toggle checked by default
  3.  * @param array $config
  4.  * @return array
  5.  */
  6. add_filter('site-reviews/config/forms/review-form', function ($config) {
  7.     if (array_key_exists('terms', $config)) {
  8.         $config['terms']['checked'] = true;
  9.     }
  10.     return $config;
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement