Skip to content

Commit 702cced

Browse files
committed
Back-compat
1 parent b8475e9 commit 702cced

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Concerns/CMB2_Form.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ public function mb_object_type() {
3333
* {@inheritdoc}
3434
*/
3535
public function get_field( $field, $field_group = null, $deprecated = false ) {
36+
if ( $field instanceof \CMB2_Field ) {
37+
return $field;
38+
}
39+
3640
$field = is_array( $field ) ? $field['id'] : (string) $field;
3741

3842
// Just for back-compat.

0 commit comments

Comments
 (0)