Hello,
I tried today to make working my custom callback condition but it's not working...
I followed documentation without success
Example code
<?php
add_action( 'admin_head', function(){
?>
<script type="text/javascript">
function dummy_function(){
console.log('dummy');
return false;
}
</script>
<?php
}, 100);
add_filter( 'rwmb_meta_boxes', function($meta_boxes){
$meta_boxes[] = array(
'title' => 'Conditional meta',
'post_types' => array( 'post', 'page' ),
'fields' => array(
array(
'visible' => ['dummy_function()', true],
'name' => 'Color',
'id' => "color",
'type' => 'text',
),
),
);
return $meta_boxes;
});
?>
If I comment lines 249 on conditional-logic.js my function is evaluated.
File is located on /plugins/meta-box-aio/meta-box-conditional-logic/conditional-logic.js
All is updated
Wordpress 5.7
Meta Box 5.3.9
Meta Box AIO 1.13.4