Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Add the "disable-select" class to the rating SELECT element to prevent it from being transformed by select2
- * @param array $field
- * @return array
- */
- add_filter('site-reviews/field/rating', function ($field) {
- $classes = explode(' ', $field['class']);
- $classes[] = 'disable-select'; // prevent select2 from modifying the rating field
- $field['class'] = implode(' ', $classes);
- return $field;
- });
Add Comment
Please, Sign In to add comment