Skip to content
Browse files

Merge pull request #28 from randyhoyt/master

Enabling custom field types
  • Loading branch information...
2 parents 88fa616 + 3b937a6 commit 8b1f2713425e9edcd6b17cdcf1601479dc2ac6da @billerickson billerickson committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 init.php
View
5 init.php
@@ -289,7 +289,8 @@ function show() {
}
echo '</div>';
break;
-
+ default:
+ do_action('cmb_render_' . $field['type'] , $field, $meta);
}
echo '</td>','</tr>';
@@ -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 );

0 comments on commit 8b1f271

Please sign in to comment.
Something went wrong with that request. Please try again.