Skip to content

Commit

Permalink
Always set the "rwmb-$field_type" as the 1st class of the field. Othe…
Browse files Browse the repository at this point in the history
…rwise, it breaks the CSS selector for cloning. See #981
  • Loading branch information
Anh committed Sep 30, 2016
1 parent be6d89c commit 160057f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ public static function normalize( $field )
'attributes' => array(),
) );

$classes = array_merge( (array) $field['class'], array( "rwmb-{$field['type']}" ) );
$field['class'] = implode( ' ', $classes );
$classes = array_merge( array( "rwmb-{$field['type']}" ), (array) $field['class'] );
$field['class'] = trim( implode( ' ', $classes ) );

return $field;
}
Expand Down

0 comments on commit 160057f

Please sign in to comment.