note_Nofunction

setCallback

function receipt_meta_box_private_notes(){
    $form = tr_form();

    echo $form->textarea('private_notes', array(), array(
        'label' => ' '
    ));
}

add_action('receipt_meta_box', function( $post_type ){
    $box = tr_meta_box('meta-box_private-notes', null, array(
        'label' => 'Private Notizen'
    ))
    ->setCallback('receipt_meta_box_private_notes')
    ->setContext('normal');

    $box->apply($post_type);
}, 10);

$box = tr_meta_box('meta-box_private-notes', null, array(
    'label' => 'Private Notizen'
))
->setContext('normal')
->setCallback(
    function(){
        $form = tr_form();

        echo $form->textarea('private_notes', array(), array(
            'label' => ' '
        ));
    }
);
$box->apply($post_type);

Share this post

Share on facebook
Share on twitter
Share on pinterest
Share on email