Hi Thomas,
You can change from closure / anonymous function to this:
add_filter( 'rwmb_outside_conditions', 'prefix_tab_conditions' );
function prefix_tab_conditions( $conditions ) {
$conditions['.rwmb-tab-totalpress_featured_image_options'] = array(
'visible' => array('_thumbnail_id', '!=', '-1'),
);
$conditions['.rwmb-tab-panel-totalpress_featured_image_options'] = array(
'visible' => array('_thumbnail_id', '!=', '-1'),
);
return $conditions;
} );
In short, just move the part function...
down and add a name for it. Then alter the add_filter
function and use the new function name.
Read more about anonymous function here.