Skip to content

Instantly share code, notes, and snippets.

@rohit-ghoghari
Created February 1, 2021 09:35
Show Gist options
  • Save rohit-ghoghari/bd6cce64978f5eff4b23d34c9d2e94c3 to your computer and use it in GitHub Desktop.
Save rohit-ghoghari/bd6cce64978f5eff4b23d34c9d2e94c3 to your computer and use it in GitHub Desktop.
<?php
// Use below code to show metabox values from anywhere
$id = get_the_ID();
$change_logs = get_post_meta($id, 'nested_repeter_group', true);
if(!empty($change_logs)) {
?>
<table class="plugin-detail-tabl <?php echo $class; ?>" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<?php
$change_logs = array_reverse($change_logs);
foreach ($change_logs as $item) {
?>
<div class="change_log">
<h2><?php echo $item['version']; ?></h2>
<p><?php echo date("F j, Y", strtotime($item["date"])); ?></p>
<?php foreach ($item['notes'] as $items) {
$add_cls = '';
$color_arr = array('New','Update','Fixed','Added','Removed');
?>
<div class="rn-desc">
<p><span class="type_color <?php echo (in_array($items['type'],$color_arr)) ? 'color_'.$items['type'] : ''; ?>"><?php echo $items['type']; ?></span></p>
<h5><?php echo $items['note']; ?></h5>
</div>
<?php } ?>
</div>
<?php } ?>
</tbody>
</table>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment