Exemplo n.º 1
0
function flamingo_htmlize($val)
{
    if (is_array($val)) {
        $result = '';
        foreach ($val as $v) {
            $result .= '<li>' . flamingo_htmlize($v) . '</li>';
        }
        return '<ul>' . $result . '</ul>';
    }
    return wpautop(esc_html((string) $val));
}
Exemplo n.º 2
0
function flamingo_inbound_fields_meta_box($post)
{
    ?>
<table class="widefat message-fields" cellspacing="0">
<tbody>

<?php 
    foreach ((array) $post->fields as $key => $value) {
        $alt = 0;
        ?>
<tr<?php 
        $alt = 1 - $alt;
        echo $alt ? ' class="alt"' : '';
        ?>
>
<td class="field-title"><?php 
        echo esc_html($key);
        ?>
</td>
<td class="field-value"><?php 
        echo flamingo_htmlize($value);
        ?>
</td>
</tr>
<?php 
    }
    ?>

</tbody>
</table>
<?php 
}
Exemplo n.º 3
0
function flamingo_inbound_meta_meta_box($post)
{
    ?>
<table class="widefat message-fields striped">
<tbody>

<?php 
    foreach ((array) $post->meta as $key => $value) {
        ?>
<tr>
<td class="field-title"><?php 
        echo esc_html($key);
        ?>
</td>
<td class="field-value"><?php 
        echo flamingo_htmlize($value);
        ?>
</td>
</tr>
<?php 
    }
    ?>

</tbody>
</table>
<?php 
}