probably a weird question.
I’m using the custom MetaBox and CustomFields Class by jaredatch on Github.
I have this “event-date” metabox:
$meta_boxes[] = array(
'id' => 'event_date',
'title' => 'Event Date',
'pages' => array( 'wr_event', ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => 'Test Date Picker (UNIX timestamp)',
'desc' => 'field description (optional)',
'id' => $prefix . 'event_date',
'type' => 'text_date_timestamp',
)
),
);
I have a second metabox called “event-review”
$meta_boxes[] = array(
'id' => 'wr_event_review',
'title' => 'Event Review',
'pages' => array( 'wr_event', ), // Post type
'context' => 'normal',
'priority' => 'high',
'show_names' => true, // Show field names on the left
'fields' => array(
array(
'name' => 'Event Review',
'id' => $prefix . 'event_wysiwyg',
'type' => 'wysiwyg',
'options' => array( 'textarea_rows' => 5, ),
)
),
);
I wonder if it’s possible to show the event-review metabox only when the date is over?
Something like…
if ( date('U') > date('U', $_POST["_wr_event_date"] ) ) {
$meta_boxes[] = array(
'id' => 'wr_event_review',
'title' => 'Event Review',
However I have no idea if this is even possible or even how I can get the current event_date
that is in the input.
Any thoughts on this?