Permalink
Browse files

Support for setting the 'multiple' property.

  • Loading branch information...
1 parent 4724aab commit 53f98e1bc3372a52d60dbe07d0323de9ff794094 @joehoyle joehoyle committed Jan 22, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 init.php
View
5 init.php
@@ -409,7 +409,10 @@ function save( $post_id) {
foreach ( $this->_meta_box['fields'] as $field ) {
$name = $field['id'];
- if ( 'multicheck' == $field['type'] ? $field['multiple'] = true : $field['multiple'] = false );
+
+ if ( ! isset( $field['multiple'] ) )
+ $field['multiple'] = ( 'multicheck' == $field['type'] ) ? true : false;
+
$old = get_post_meta( $post_id, $name, !$field['multiple'] /* If multicheck this can be multiple values */ );
$new = isset( $_POST[$field['id']] ) ? $_POST[$field['id']] : null;

0 comments on commit 53f98e1

Please sign in to comment.