Skip to content

Commit

Permalink
Merge pull request WebDevStudios#28 from randyhoyt/master
Browse files Browse the repository at this point in the history
Enabling custom field types
  • Loading branch information
billerickson committed Sep 30, 2011
2 parents 88fa616 + 3b937a6 commit 8b1f271
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion init.php
Expand Up @@ -289,7 +289,8 @@ function show() {
}
echo '</div>';
break;

default:
do_action('cmb_render_' . $field['type'] , $field, $meta);
}

echo '</td>','</tr>';
Expand Down Expand Up @@ -343,6 +344,8 @@ function save( $post_id) {
$new = strtotime( $new );
}

$new = apply_filters('cmb_validate_' . $field['type'], $new, $post_id, $field);

// validate meta value
if ( isset( $field['validate_func']) ) {
$ok = call_user_func( array( 'cmb_Meta_Box_Validate', $field['validate_func']), $new );
Expand Down

0 comments on commit 8b1f271

Please sign in to comment.