1

我正在创建自己的 cmb2 自定义字段。我想在我的自定义字段中添加另一个自定义字段或默认 CMB2 字段...可以吗?

我使用 cmb2 文档创建并呈现自定义字段,并像这样cmb2_render_{field-type}呈现字段

function cmb2_render_callback_for_text_email( $field, $escaped_value, $object_id, $object_type, $field_type_object ) {
    echo $field_type_object->input( array( 'type' => 'email' ) );
}

add_action( 'cmb2_render_text_email', 'cmb2_render_callback_for_text_email', 10, 5 );

我正在尝试将另一个自定义字段添加到回调函数中,但没有得到任何结果。

4

0 回答 0