geminilabs

[site-reviews] Fix rating control in Pearl theme

Jul 6th, 2018 (edited)
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. /**
  2.  * Site Review v5
  3.  * Add the "no_wrap" class to the rating SELECT element to prevent it from being transformed by the Pearl theme
  4.  * @param array $field
  5.  * @return array
  6.  */
  7. add_filter('site-reviews/field/rating', function ($field) {
  8.     $classes = explode(' ', $field['class']);
  9.     $classes[] = 'no_wrap';
  10.     $field['class'] = implode(' ', $classes);
  11.     return $field;
  12. });
Add Comment
Please, Sign In to add comment